Why is accept_mutex 'on' used by default in Nginx?

I found the "accept_mutex" 'on' by default in Nginx as follows:

http://wiki.nginx.org/EventsModule

Then mutex is required to accept the connection? Why?

+5
source share
2 answers

Starting with nginx version mainline version 1.11.3 (released 2016-07-26), it is accept_mutexnow used by defaultoff . This is partly due to the fact that the new flag EPOLLEXCLUSIVEprovides benefits accept_mutexwithout additional overhead.

+4
source

, epoll. mutex , . . http://en.wikipedia.org/wiki/Thundering_herd_problem

.

: http://en.wikipedia.org/wiki/Lock_convoy

, 5-10% .

: "accept mutex" - mutext lock around accept. , . .

+3

All Articles