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:
Aitte 2013-02-24 15:47:51 -05:00 committed by Andy Dawson
parent e79e23fa0c
commit df1bdb7ab6
1 changed files with 5 additions and 5 deletions

View File

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