From a89548a4e11c1a607493a89e74a9a18feeb32f2c Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Mon, 30 Nov 2015 16:27:33 +0300 Subject: [PATCH] Increased the default "connection_pool_size" on 64-bit platforms. The previous default of 256 bytes isn't enough and results in two allocations on each accepted connection, which is suboptimal. --- src/http/ngx_http_core_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 7a2960830..9946958b7 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -3503,7 +3503,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child) /* TODO: it does not merge, it inits only */ ngx_conf_merge_size_value(conf->connection_pool_size, - prev->connection_pool_size, 256); + prev->connection_pool_size, NGX_PTR_SIZE * 64); ngx_conf_merge_size_value(conf->request_pool_size, prev->request_pool_size, 4096); ngx_conf_merge_msec_value(conf->client_header_timeout,