]> git.kaiwu.me - nginx.git/commitdiff
Bigger iovec buffer in ngx_readv_chain().
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 28 Jul 2014 14:30:19 +0000 (18:30 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 28 Jul 2014 14:30:19 +0000 (18:30 +0400)
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.

src/os/unix/ngx_readv_chain.c

index 8836c817dad0e7831b20e3251c7260e7e336e9f2..e4eb5ff3281ef9dd0658577943e85dba13ef2943 100644 (file)
 #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)