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.
This commit is contained in:
Amaury Denoyelle 2025-01-30 14:56:35 +01:00
parent 0c8b54b2d1
commit a19d9b0486
3 changed files with 23 additions and 36 deletions

View File

@ -1685,6 +1685,7 @@ The following keywords are supported in the "global" section :
- tune.pool-low-fd-ratio - tune.pool-low-fd-ratio
- tune.pt.zero-copy-forwarding - tune.pt.zero-copy-forwarding
- tune.quic.cc-hystart - tune.quic.cc-hystart
- tune.quic.disable-tx-pacing
- tune.quic.disable-udp-gso - tune.quic.disable-udp-gso
- tune.quic.frontend.glitches-threshold - tune.quic.frontend.glitches-threshold
- tune.quic.frontend.max-idle-timeout - 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.reorder-ratio
- tune.quic.retry-threshold - tune.quic.retry-threshold
- tune.quic.socket-owner - tune.quic.socket-owner
- tune.quic.tx-pacing
- tune.quic.zero-copy-fwd-send - tune.quic.zero-copy-fwd-send
- tune.renice.runtime - tune.renice.runtime
- tune.renice.startup - 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 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. 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 tune.quic.disable-udp-gso
Disable UDP GSO emission. This kernel feature allows to emit multiple Disable UDP GSO emission. This kernel feature allows to emit multiple
datagrams via a single system call which is more efficient for large 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 is used globally, it will be forced on every listener instance, regardless of
their individual configuration. 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 } tune.quic.zero-copy-fwd-send { on | off }
Enables ('on') of disabled ('off') the zero-copy sends of data for the QUIC Enables ('on') of disabled ('off') the zero-copy sends of data for the QUIC
multiplexer. It is enabled by default. 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 for any connection attempts to the configured QUIC listeners. They are
similar to those used by TCP. similar to those used by TCP.
Pacing can be activated on top of the congestion algorithm to reduce loss and Pacing is activated on top of the congestion algorithm to reduce loss and
improve throughput. This is performed via "tune.quic.tx-pacing" experimental improve throughput. It can be turned off via "tune.quic.disable-tx-pacing"
global keyword. Special care is required when using BBR as it relies on global keyword. In most cases, pacing should remain activated, especially
pacing to work as expected. Using BBR without it may cause slowdowns or high when using BBR as it relies on it to work as expected. Using BBR without
loss rates during transfers. Also note that haproxy's BBR implementation is pacing may cause slowdowns or high loss rates during transfers. Also note
also considered as experimental and cannot be enabled without that haproxy's BBR implementation is also considered as experimental and
"expose-experimental-directives". cannot be enabled without "expose-experimental-directives".
Default value: cubic Default value: cubic

View File

@ -356,7 +356,10 @@ static int cfg_parse_quic_tune_setting0(char **args, int section_type,
return -1; return -1;
suffix = args[0] + prefix_len; 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; global.tune.options |= GTUNE_QUIC_NO_UDP_GSO;
} }
else { else {
@ -401,18 +404,6 @@ static int cfg_parse_quic_tune_on_off(char **args, int section_type, struct prox
else else
global.tune.options &= ~GTUNE_QUIC_CC_HYSTART; 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; 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, { static struct cfg_kw_list cfg_kws = {ILH, {
{ CFG_GLOBAL, "tune.quic.socket-owner", cfg_parse_quic_tune_socket_owner }, { 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.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.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.conn-tx-buffers.limit", cfg_parse_quic_tune_setting },
{ CFG_GLOBAL, "tune.quic.frontend.glitches-threshold", 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.max-frame-loss", cfg_parse_quic_tune_setting },
{ CFG_GLOBAL, "tune.quic.reorder-ratio", 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.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.disable-udp-gso", cfg_parse_quic_tune_setting0 },
{ CFG_GLOBAL, "tune.quic.zero-copy-fwd-send", cfg_parse_quic_tune_on_off }, { CFG_GLOBAL, "tune.quic.zero-copy-fwd-send", cfg_parse_quic_tune_on_off },
{ 0, NULL, NULL } { 0, NULL, NULL }

View File

@ -1375,7 +1375,6 @@ static void init_args(int argc, char **argv)
#endif #endif
#ifdef USE_QUIC #ifdef USE_QUIC
global.tune.options |= GTUNE_QUIC_SOCK_PER_CONN; global.tune.options |= GTUNE_QUIC_SOCK_PER_CONN;
global.tune.options |= GTUNE_QUIC_NO_PACING;
#endif #endif
global.tune.options |= GTUNE_STRICT_LIMITS; global.tune.options |= GTUNE_STRICT_LIMITS;