# HG changeset patch # User Maxim Dounin # Date 1406557819 -14400 # Node ID d1bde5c3c5d21368de04a59506a06c1174353a19 # Parent 294d020bbcfec2fcddbe35f3a76610ebd6084d7a 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. diff --git a/src/os/unix/ngx_readv_chain.c b/src/os/unix/ngx_readv_chain.c --- a/src/os/unix/ngx_readv_chain.c +++ b/src/os/unix/ngx_readv_chain.c @@ -10,7 +10,11 @@ #include -#define NGX_IOVS 16 +#if (IOV_MAX > 64) +#define NGX_IOVS 64 +#else +#define NGX_IOVS IOV_MAX +#endif #if (NGX_HAVE_KQUEUE)