]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: use dynamic credit for pacing
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 22 Jan 2025 16:26:13 +0000 (17:26 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Jan 2025 16:40:48 +0000 (17:40 +0100)
commitcb91ccd8a8b548d85bf5155b1a8ce759f1480a4e
tree248d884854a2a176090aea24e368e70a578e6bbd
parent8098be1fdc71fd548ade4aa0530918bf7cc2a8f4
MEDIUM: quic: use dynamic credit for pacing

Major improvements have been introduced in pacing recently. Most
notably, QMUX schedules emission on a millisecond resolution, which
allow to use passive wait to be much CPU friendly.

However, an issue remains with the pacing max credit. Unless BBR is
used, it is fixed to the configured value from quic-cc-algo bind
statement. This is not practical as if too low, it may drastically
reduce performance due to 1ms sleep resolution. If too high, some
clients will suffer from too much packet loss.

This commit fixes the issue by implementing a dynamic maximum credit
value based on the network condition specific to each clients.
Calculation is done to fix a maximum value which should allow QMUX
current tasklet context to emit enough data to cover the delay with the
next tasklet invokation. As such, avg_loop_us is used to detect the
process load. If too small, 1.5ms is used as minimal value, to cover the
extra delay incurred by the system which will happen for a default 1ms
sleep.

This should be backported up to 3.1.
doc/configuration.txt
include/haproxy/quic_pacing.h
src/quic_pacing.c