Opened 7 years ago
Closed 7 years ago
#1311 closed defect (duplicate)
worker_processes auto mode does not consider isolated CPUs
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | other | Version: | 1.13.x |
Keywords: | Cc: | ||
uname -a: | |||
nginx -V: | nginx/1.10.3 |
Description
When worker_processes is set to "auto" - it does not take into consideration isolated CPUs in case such exist - and it's possible that a system which has 16 CPUs, of which 8 are isolated - that runs nginx with this option, to result in 16 nginx processes instead of 8.
Note:
See TracTickets
for help on using tickets.
By "isolated CPUs" you mean Linux kernel
isolcpus=
option? This option merely configures default CPU affinity, and it is still possible for nginx workers to run on "isolated" CPUs when usingtaskset
and/orworker_cpu_affinity
. For example, on a system with 3 CPUs withisolcpus=1-2
a configuration like this:will correctly start 3 worker process bound to 1st, 2nd, and 3rd CPUs respectively.
Overall this seems to be a duplicate of ticket #1151, which also about improving detection of number of CPUs for
worker_processes auto;
.