]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mux-quic: reduce pacing CPU usage with passive wait
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 22 Jan 2025 16:31:10 +0000 (17:31 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Jan 2025 16:40:22 +0000 (17:40 +0100)
commit8098be1fdc71fd548ade4aa0530918bf7cc2a8f4
tree4a691e01e7170d42e6341d106bd54398ad8aee13
parent4489a61585283803726b10c5b081c26f24b7d8dd
MEDIUM: mux-quic: reduce pacing CPU usage with passive wait

Pacing algorithm has been revamped in the previous commit to implement a
credit based solution. This is a far more adaptative solution, in
particular which allow to catch up in case pause between pacing emission
was longer than expected.

This allows QMUX to remove the active loop based on tasklet wake-up.
Instead, a new task is used when emission should be paced. The main
advantage is that CPU usage is drastically reduced.

New pacing task timer is reset each time qcc_io_send() is invoked. Timer
will be set only if pacing engine reports that emission must be
interrupted. In this case timer is set via qcc_wakeup_pacing() to the
delay reported by congestion algorithm, or 1ms if delay is too short. At
the end of qcc_io_cb(), pacing task is queued if timer has been set.

Pacing task execution is simple enough : it immediately wakes up QCC I/O
handler.

Note that to have decent performance, it requires to have a large enough
burst defined in configuration of quic-cc-algo. However, this value is
common to every listener clients, which may cause too much loss under
network conditions. This will be address in a future patch.

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