Skip to content
Snippets Groups Projects
Commit 2b064090 authored by Konstantin Pavlov's avatar Konstantin Pavlov
Browse files

Introduced an entrypoint script to autotune the number of worker processes

The script is a no-op bye default, you would need to enable its logic by
setting an NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE variable to any
value.

The script then tries to get the following values:

 - getconf _NPROCESSORS_ONLN
 - the amount of cpus from cpuset cgroupv1
 - the quotas from cpu/cpuacct cgroupv1
 - the amount of cpus from cgroupv2
 - the quotas from cgroupv2

The lowest of all five is then applied to nginx.conf.

Fixes #472
parent 2f285912
No related branches found
No related tags found
No related merge requests found
Showing
with 1756 additions and 0 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment