S
S
Sergey Pugovkin2020-08-15 14:58:37
linux
Sergey Pugovkin, 2020-08-15 14:58:37

Specific difference between multi_accept on and off?

multi_accept on; # Will accept as many connections as possible

It would seem obvious that this value should always be on , otherwise there is a clear performance penalty. However, the default is off .

Here it is indicated that
Probably because with on, all the worker processes are active and try to handle all of the incoming request simultaneously. When disabled, Nginx decides which child process gets to deal with the request one by one. As Nginx is very efficient at this, this probably serves most people well. Some consider it a risk to enable it, as it may flood the worker connections with requests. Your TCP settings at OS level will likely play a part in this too.

i.e., if I understand correctly, nginx in the case of off distributes new connections between child processes very efficiently. Otherwise, all processes at once try to process all connections at once? What is it like?
And the nginx blog recommends leaving the default value (off), without details (they say, test it yourself and already think).

The search for specific differences between multi_accept on and off did not lead to anything. Except for articles where it is highly recommended to put on, because it's "cool".
What should I do on a Debian 11 x64 multi-core system?
In simple terms, can more than one person be online with multi_accept off?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
poige, 2020-08-17
@Driver86

Answer by Valentin Bartenev - no SMS!

E
edo1h, 2020-08-15
@edo1h

Here it is indicated

well, they answered in the same place: one worker can wake up and “grab” all pending incoming connections, as a result there will be an imbalance and, in general, not very good.
What should I do on a Debian 11 x64 multi-core system?

the rules are simple: if you don’t understand something, don’t change it, nginx default is good enough for most applications.
In simple terms, can more than one person be online with multi_accept off?

IMHO it's easier to take and check than to ask here.
but since you asked: yes, it is quite common to have hundreds or thousands of active connections per worker.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question