From: Igor Sysoev Date: Fri, 19 Sep 2008 12:47:13 +0000 (+0000) Subject: dynamic accept threshold X-Git-Tag: release-0.7.18~16 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=e17cc987d32259f19145a260e9ee755c1cf21227;p=nginx.git dynamic accept threshold --- diff --git a/src/core/ngx_config.h b/src/core/ngx_config.h index 5861bfd09..ab73079a6 100644 --- a/src/core/ngx_config.h +++ b/src/core/ngx_config.h @@ -110,8 +110,6 @@ typedef intptr_t ngx_flag_t; #define ngx_inline inline #endif -#define NGX_ACCEPT_THRESHOLD 100 - #ifndef INADDR_NONE /* Solaris */ #define INADDR_NONE ((unsigned int) -1) #endif diff --git a/src/event/ngx_event_accept.c b/src/event/ngx_event_accept.c index 39b651539..379abb9c3 100644 --- a/src/event/ngx_event_accept.c +++ b/src/event/ngx_event_accept.c @@ -82,7 +82,7 @@ ngx_event_accept(ngx_event_t *ev) ngx_atomic_fetch_add(ngx_stat_accepted, 1); #endif - ngx_accept_disabled = NGX_ACCEPT_THRESHOLD + ngx_accept_disabled = ngx_cycle->connection_n / 8 - ngx_cycle->free_connection_n; c = ngx_get_connection(s, ev->log);