aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_readv_chain.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2014-07-28 18:30:19 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2014-07-28 18:30:19 +0400
commit5958181b1e28089a4e487511fe208f586a8b3205 (patch)
treeab3e3ad0cd78eba81189a4408255476df58d8e4c /src/os/unix/ngx_readv_chain.c
parent8639e17f94f6e41be874638b3b0bf8b1d0dd5015 (diff)
downloadnginx-5958181b1e28089a4e487511fe208f586a8b3205.tar.gz
nginx-5958181b1e28089a4e487511fe208f586a8b3205.zip
Bigger iovec buffer in ngx_readv_chain().
This helps to reduce likelyhood of memory allocations in ngx_readv_chain(), which are known to lead to noticeable effects in some cases, see http://mailman.nginx.org/pipermail/nginx/2014-July/044512.html.
Diffstat (limited to 'src/os/unix/ngx_readv_chain.c')
-rw-r--r--src/os/unix/ngx_readv_chain.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/os/unix/ngx_readv_chain.c b/src/os/unix/ngx_readv_chain.c
index 8836c817d..e4eb5ff32 100644
--- a/src/os/unix/ngx_readv_chain.c
+++ b/src/os/unix/ngx_readv_chain.c
@@ -10,7 +10,11 @@
#include <ngx_event.h>
-#define NGX_IOVS 16
+#if (IOV_MAX > 64)
+#define NGX_IOVS 64
+#else
+#define NGX_IOVS IOV_MAX
+#endif
#if (NGX_HAVE_KQUEUE)