From 5958181b1e28089a4e487511fe208f586a8b3205 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Mon, 28 Jul 2014 18:30:19 +0400 Subject: 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. --- src/os/unix/ngx_readv_chain.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/os/unix/ngx_readv_chain.c') 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 -#define NGX_IOVS 16 +#if (IOV_MAX > 64) +#define NGX_IOVS 64 +#else +#define NGX_IOVS IOV_MAX +#endif #if (NGX_HAVE_KQUEUE) -- cgit