variety of nginx employee procedures

I'm establishing nginx to offer a Drupal install, and also I appear to locate contradictory details on the nginx employee procedures establishing. One website claims you require 2, one claims you require 5, one claims one per cpu ...

How should I select the variety of nginx employee procedures? If it makes a distinction, it attends VM on a VMWare collection, and also I've offered it one digital cpu.

2019-05-19 00:03:24
Source Share
Answers: 2

On SMP systems, at the very least nCPU employee procedures need to be begun : on quad - core - 4 etc That is enougth for proxying.

If you are mosting likely to offer some websites with alot of fixed web content, it would certainly be far better to add even more employees - one per disk.

If your disk subsystem is to inadequate or load expensive, nginx employee procedures might come to be secured on I/O procedures and also can not offer various other demands. In this instance you need to increase variety of employee procedures to some ideal value (might be 10s), or add some memory for disk cache.

Check into "ps ax" hard copy : employees that remain in "D" state are secured. Increase till access the very least nCPU employee refines not obstructed.

2019-12-03 03:19:32

Nginx unlike Apache and also various other process per link webservers. It makes use of one master process to start and also check a handful of employee procedures that in fact take care of the links. My referral is to begin with the default variety of employees, which is 1.

worker_processes  1;

You will just require to increase this if you locate that the nginx employee is investing way too much time obstructed on IO. This will certainly not by till it is offering several thousands of demands per secondly.

You might additionally locate these setups valuable.

worker_rlimit_nofile 8192;

events {
    worker_connections  2048;
    use epoll;
2019-05-21 07:27:54