From a19d9b0486be6a260a0d9b24ecb08044d9e45f68 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 30 Jan 2025 14:56:35 +0100 Subject: [PATCH] MAJOR: quic: mark pacing as stable and enable it by default Remove pacing experimental status, so it's not required anymore to use expose-experimental-directives to enable it. Along this change, pacing is now activated by default. As such, pacing configuration is transformed into its final form. The global on/off setting is turned into a disable setting without argument. --- doc/configuration.txt | 39 ++++++++++++++++++--------------------- src/cfgparse-quic.c | 19 +++++-------------- src/haproxy.c | 1 - 3 files changed, 23 insertions(+), 36 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index c61ba1bd6..8a0af0f94 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -1685,6 +1685,7 @@ The following keywords are supported in the "global" section : - tune.pool-low-fd-ratio - tune.pt.zero-copy-forwarding - tune.quic.cc-hystart + - tune.quic.disable-tx-pacing - tune.quic.disable-udp-gso - tune.quic.frontend.glitches-threshold - tune.quic.frontend.max-idle-timeout @@ -1694,7 +1695,6 @@ The following keywords are supported in the "global" section : - tune.quic.reorder-ratio - tune.quic.retry-threshold - tune.quic.socket-owner - - tune.quic.tx-pacing - tune.quic.zero-copy-fwd-send - tune.renice.runtime - tune.renice.startup @@ -4183,6 +4183,16 @@ tune.quic.cc.cubic.min-losses compare some metrics. Never go beyond 2 without an expert's prior analysis of the situation. The default and minimum value is 1. Always use 1. +tune.quic.disable-tx-pacing + Disables pacing support for QUIC emission. The purpose of pacing is to smooth + emission of data to reduce network losses. In most scenario, it will + significantly improve network throughput by avoiding retransmissions. + However, it can be useful to deactivate it for networks with very high + bandwidth/low latency characteristics to prevent unwanted delay and reduce + CPU consumption. + + See also the "quic-cc-algo" bind option. + tune.quic.disable-udp-gso Disable UDP GSO emission. This kernel feature allows to emit multiple datagrams via a single system call which is more efficient for large @@ -4288,19 +4298,6 @@ tune.quic.socket-owner { connection | listener } is used globally, it will be forced on every listener instance, regardless of their individual configuration. -tune.quic.tx-pacing { on | off } - Enables ('on') or disables ('off') pacing support for QUIC emission. By - default it is disabled. The purpose of pacing is to smooth emission of data - to reduce network losses. In most scenario, it can significantly improve - network throughput by avoiding retransmissions. However, it can be useful to - deactivate it for networks with very high bandwidth/low latency - characteristics to prevent unwanted delay and reduce CPU consumption. - - Pacing support is still experimental, as such it requires - "expose-experimental-directives". - - See also the "quic-cc-algo" bind option. - tune.quic.zero-copy-fwd-send { on | off } Enables ('on') of disabled ('off') the zero-copy sends of data for the QUIC multiplexer. It is enabled by default. @@ -17304,13 +17301,13 @@ quic-cc-algo { cubic | newreno | bbr | nocc }[()] for any connection attempts to the configured QUIC listeners. They are similar to those used by TCP. - Pacing can be activated on top of the congestion algorithm to reduce loss and - improve throughput. This is performed via "tune.quic.tx-pacing" experimental - global keyword. Special care is required when using BBR as it relies on - pacing to work as expected. Using BBR without it may cause slowdowns or high - loss rates during transfers. Also note that haproxy's BBR implementation is - also considered as experimental and cannot be enabled without - "expose-experimental-directives". + Pacing is activated on top of the congestion algorithm to reduce loss and + improve throughput. It can be turned off via "tune.quic.disable-tx-pacing" + global keyword. In most cases, pacing should remain activated, especially + when using BBR as it relies on it to work as expected. Using BBR without + pacing may cause slowdowns or high loss rates during transfers. Also note + that haproxy's BBR implementation is also considered as experimental and + cannot be enabled without "expose-experimental-directives". Default value: cubic diff --git a/src/cfgparse-quic.c b/src/cfgparse-quic.c index 4d3a6f7ea..aa90aa06b 100644 --- a/src/cfgparse-quic.c +++ b/src/cfgparse-quic.c @@ -356,7 +356,10 @@ static int cfg_parse_quic_tune_setting0(char **args, int section_type, return -1; suffix = args[0] + prefix_len; - if (strcmp(suffix, "disable-udp-gso") == 0) { + if (strcmp(suffix, "disable-tx-pacing") == 0) { + global.tune.options |= GTUNE_QUIC_NO_PACING; + } + else if (strcmp(suffix, "disable-udp-gso") == 0) { global.tune.options |= GTUNE_QUIC_NO_UDP_GSO; } else { @@ -401,18 +404,6 @@ static int cfg_parse_quic_tune_on_off(char **args, int section_type, struct prox else global.tune.options &= ~GTUNE_QUIC_CC_HYSTART; } - else if (strcmp(suffix, "tune.quic.tx-pacing") == 0) { - if (on) { - if (!experimental_directives_allowed) { - memprintf(err, "'%s' : support for pacing is experimental, must be allowed via a global " - "'expose-experimental-directives'\n", args[0]); - return -1; - } - global.tune.options &= ~GTUNE_QUIC_NO_PACING; - } - else - global.tune.options |= GTUNE_QUIC_NO_PACING; - } return 0; } @@ -420,7 +411,6 @@ static int cfg_parse_quic_tune_on_off(char **args, int section_type, struct prox static struct cfg_kw_list cfg_kws = {ILH, { { CFG_GLOBAL, "tune.quic.socket-owner", cfg_parse_quic_tune_socket_owner }, { CFG_GLOBAL, "tune.quic.cc-hystart", cfg_parse_quic_tune_on_off }, - { CFG_GLOBAL, "tune.quic.tx-pacing", cfg_parse_quic_tune_on_off }, { CFG_GLOBAL, "tune.quic.cc.cubic.min-losses", cfg_parse_quic_tune_setting }, { CFG_GLOBAL, "tune.quic.frontend.conn-tx-buffers.limit", cfg_parse_quic_tune_setting }, { CFG_GLOBAL, "tune.quic.frontend.glitches-threshold", cfg_parse_quic_tune_setting }, @@ -430,6 +420,7 @@ static struct cfg_kw_list cfg_kws = {ILH, { { CFG_GLOBAL, "tune.quic.max-frame-loss", cfg_parse_quic_tune_setting }, { CFG_GLOBAL, "tune.quic.reorder-ratio", cfg_parse_quic_tune_setting }, { CFG_GLOBAL, "tune.quic.retry-threshold", cfg_parse_quic_tune_setting }, + { CFG_GLOBAL, "tune.quic.disable-tx-pacing", cfg_parse_quic_tune_setting0 }, { CFG_GLOBAL, "tune.quic.disable-udp-gso", cfg_parse_quic_tune_setting0 }, { CFG_GLOBAL, "tune.quic.zero-copy-fwd-send", cfg_parse_quic_tune_on_off }, { 0, NULL, NULL } diff --git a/src/haproxy.c b/src/haproxy.c index 561cab067..22a17adc7 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -1375,7 +1375,6 @@ static void init_args(int argc, char **argv) #endif #ifdef USE_QUIC global.tune.options |= GTUNE_QUIC_SOCK_PER_CONN; - global.tune.options |= GTUNE_QUIC_NO_PACING; #endif global.tune.options |= GTUNE_STRICT_LIMITS;