changeset 5776:d1bde5c3c5d2

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 28 Jul 2014 18:30:19 +0400
parents 294d020bbcfe
children 4d092aa2f463
files src/os/unix/ngx_readv_chain.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)