August 2017
Intermediate to advanced
278 pages
8h 53m
English
To adjust the number of worker processes, we need to edit the main NGINX configuration file. For most installations, this will be located at /etc/nginx/nginx.conf, and the directive is generally the first line in the file. Here's what you may see for a default value:
worker_processes 1;
If the server is dedicated to just running NGINX (for example, it doesn't have the database and other services also running on it), a good rule of thumb is to set it to the number of CPU's available. Consider this example when you have four CPU's:
worker_processes 4;
If you have a high number of connections and they're not CPU bound (for example, heavy disk I/O), having more processes than CPU's may assist with increasing the overall throughput ...
Read now
Unlock full access