]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MAJOR: quic: mark pacing as stable and enable it by default
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 30 Jan 2025 13:56:35 +0000 (14:56 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 30 Jan 2025 16:20:41 +0000 (17:20 +0100)
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
src/cfgparse-quic.c
src/haproxy.c

index c61ba1bd640247497af3c191291d56e1e3ea475d..8a0af0f9403099a660150ee923141ccfa6f74665 100644 (file)
@@ -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 <number>
   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 }[(<args,...>)]
   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
 
index 4d3a6f7ea70fe0a8a75b89c72dd4c875cd153951..aa90aa06b280589e41f3e706b21354ffb333342b 100644 (file)
@@ -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 }
index 561cab067de0aa3765f3f13bcc087f0d08e63f97..22a17adc7c4bed418c6f944f785b800ff1435dd4 100644 (file)
@@ -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;