From b488a365327147716eb9f7947da910fb97e5d96b Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 8 Dec 2014 23:34:49 +0100 Subject: MEDIUM: httpterm: enable splicing by default and tune buffer sizes Several settings were added in the automatic config, such as tune.bufsize, tune.pipesize and option splice-response. --- src/haproxy.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/haproxy.c b/src/haproxy.c index e825fbb..081fa68 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -725,6 +725,25 @@ void init(int argc, char **argv) if (cmd_listener) { int line = 1; + if (parse_cfg_line(cfg_parse_global, "command_line", line++, "global", NULL) != 0) + exit(1); + + if (parse_cfg_line(cfg_parse_global, "command_line", line++, "maxconn", "200000", NULL) != 0) + exit(1); + + if (parse_cfg_line(cfg_parse_global, "command_line", line++, "tune.bufsize", "524288", NULL) != 0) + exit(1); + +#ifdef CONFIG_HAP_LINUX_SPLICE + if (parse_cfg_line(cfg_parse_global, "command_line", line++, "tune.pipesize", "262144", NULL) != 0) + exit(1); +#endif + +#ifdef USE_OPENSSL + if (parse_cfg_line(cfg_parse_global, "command_line", line++, "tune.ssl.default-dh-param", "1024", NULL) != 0) + exit(1); +#endif + if (parse_cfg_line(cfg_parse_listen, "command_line", line++, "frontend", "cmdline", NULL) != 0) exit(1); @@ -736,6 +755,11 @@ void init(int argc, char **argv) if (parse_cfg_line(cfg_parse_listen, "command_line", line++, "timeout", "client", "10s", NULL) != 0) exit(1); + +#ifdef CONFIG_HAP_LINUX_SPLICE + if (parse_cfg_line(cfg_parse_listen, "command_line", line++, "option", "splice-response", NULL) != 0) + exit(1); +#endif } list_for_each_entry(wl, &cfg_cfgfiles, list) { -- 1.7.12.1