diff src/os/unix/ngx_readv_chain.c @ 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 ee78c7705a8e
children 43512a33e8f2
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)