nginx.conf: Make use of the "auto" directive to let nginx spawn as many workers as there are CPU cores
This commit is contained in:
parent
e79e23fa0c
commit
df1bdb7ab6
|
@ -1,14 +1,14 @@
|
||||||
# Set another default user than root for security reasons
|
# Set another default user than root for security reasons
|
||||||
user www www;
|
user www www;
|
||||||
|
|
||||||
# As a thumb rule: One per CPU. If you are serving a large amount
|
# How many worker threads to run; "auto" sets it to the number
|
||||||
# of static files, which requires blocking disk reads, you may want
|
# of CPU cores available in the system, and offers the best
|
||||||
# to increase this from the number of cpu_cores available on your
|
# performance. Don't set it higher than the number of CPU cores
|
||||||
# system.
|
# if changing this parameter.
|
||||||
#
|
#
|
||||||
# The maximum number of connections for Nginx is calculated by:
|
# The maximum number of connections for Nginx is calculated by:
|
||||||
# max_clients = worker_processes * worker_connections
|
# max_clients = worker_processes * worker_connections
|
||||||
worker_processes 1;
|
worker_processes auto;
|
||||||
|
|
||||||
# Maximum file descriptors that can be opened per process
|
# Maximum file descriptors that can be opened per process
|
||||||
# This should be > worker_connections
|
# This should be > worker_connections
|
||||||
|
|
Loading…
Reference in New Issue