Welcome! Log In Create A New Profile

Advanced

[nginx] Bigger iovec buffer in ngx_readv_chain().

Maxim Dounin
July 28, 2014 10:34AM
details: http://hg.nginx.org/nginx/rev/d1bde5c3c5d2
branches:
changeset: 5776:d1bde5c3c5d2
user: Maxim Dounin <mdounin@mdounin.ru>
date: Mon Jul 28 18:30:19 2014 +0400
description:
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.

diffstat:

src/os/unix/ngx_readv_chain.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

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 <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)

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Bigger iovec buffer in ngx_readv_chain().

Maxim Dounin 593 July 28, 2014 10:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 266
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready