[nginx] Events: the "accept_mutex" directive is turned off by default.

Valentin Bartenev vbart at nginx.com
Fri Jul 15 12:35:35 UTC 2016


details:   http://hg.nginx.org/nginx/rev/d82b3c344e7e
branches:  
changeset: 6633:d82b3c344e7e
user:      Valentin Bartenev <vbart at nginx.com>
date:      Fri Jul 15 15:18:57 2016 +0300
description:
Events: the "accept_mutex" directive is turned off by default.

Now it is believed that the accept mutex brings more harm than benefits.
Especially in various benchmarks it often results in situation where only
one worker grabs all connections.

diffstat:

 src/event/ngx_event.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 787dcc15b802 -r d82b3c344e7e src/event/ngx_event.c
--- a/src/event/ngx_event.c	Tue Jul 12 17:34:52 2016 +0300
+++ b/src/event/ngx_event.c	Fri Jul 15 15:18:57 2016 +0300
@@ -1261,7 +1261,7 @@ ngx_event_core_init_conf(ngx_cycle_t *cy
     ngx_conf_init_ptr_value(ecf->name, event_module->name->data);
 
     ngx_conf_init_value(ecf->multi_accept, 0);
-    ngx_conf_init_value(ecf->accept_mutex, 1);
+    ngx_conf_init_value(ecf->accept_mutex, 0);
     ngx_conf_init_msec_value(ecf->accept_mutex_delay, 500);
 
     return NGX_CONF_OK;



More information about the nginx-devel mailing list