Worker_processes,worker_cpu_affinity and Worker_connections of Nginx

Source: Internet
Author: User

Worker_processes:nginx number of processes to open, typically CPU cores

Worker_cpu_affinity: Binds a CPU to each process, reducing the overhead of CPU switching

Example configuration:

Worker_processes 8;
Worker_cpu_affinity 00000001 00000010 00000100 00001000 00010000 00100000 01000000 10000000;

Worker_connections: Maximum number of connections that a worker process can concurrently process (originate)

For Nginx maximum client, the calculation method is as follows:

Nginx as the HTTP server when:

max_clients = worker_processes * worker_connections

Nginx as the reverse proxy server:

max_clients = worker_processes * WORKER_CONNECTIONS/4

Worker_processes,worker_cpu_affinity and Worker_connections of Nginx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.