From c26ca3f77a5b5c75ac49661821e2b39be70df45e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 5 Sep 2012 18:37:41 +0200 Subject: MINOR: add support for setting pipe size on the command line using -P Doing this allows one to change the pipe size to 256kB from the default 64kB without having to write a config file. On a dockstar, the local data rate jumps from 880kB/s to 1060kB/s. --- httpterm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/httpterm.c b/httpterm.c index 61ffc95..6dee897 100644 --- a/httpterm.c +++ b/httpterm.c @@ -674,7 +674,7 @@ void usage(char *name) { fprintf(stderr, "Usage : %s [-f ] [ -vdV" "D ] [ -n ] [ -N ]\n" - " [ -p ] [ -m ]\n" + " [ -p ] [ -m ] [ -P ]\n" " -v displays version\n" " -d enters debug mode ; -db only disables background mode.\n" " -V enters verbose mode (disables quiet mode)\n" @@ -693,6 +693,7 @@ void usage(char *name) { #endif #if defined(ENABLE_SPLICE) " -dS disables splice() usage even when available\n" + " -P sets splice pipe size in kB\n" #endif " -L []: adds a listener with one server\n" " -sf/-st [pid ]* finishes/terminates old pids. Must be last arguments.\n" @@ -3784,6 +3785,9 @@ void init(int argc, char **argv) { case 'f' : cfg_cfgfile = *argv; break; case 'p' : cfg_pidfile = *argv; break; case 'L' : cmdline_listen = *argv; break; +#if defined(ENABLE_SPLICE) + case 'P' : pipesize = atol(*argv) * 1024; break; +#endif default: usage(old_argv); } } -- 1.7.12.4.dirty