]> git.kaiwu.me - nginx.git/commitdiff
Events: the "accept_mutex" directive is turned off by default.
authorValentin Bartenev <vbart@nginx.com>
Fri, 15 Jul 2016 12:18:57 +0000 (15:18 +0300)
committerValentin Bartenev <vbart@nginx.com>
Fri, 15 Jul 2016 12:18:57 +0000 (15:18 +0300)
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.

src/event/ngx_event.c

index c8ae5b2cf9ef4040e6d0b182b49464dc96074cc2..2f3a098dec25814efda6cac5735f4aeb586b9f0d 100644 (file)
@@ -1261,7 +1261,7 @@ ngx_event_core_init_conf(ngx_cycle_t *cycle, void *conf)
     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;