]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tcp: add support for setting TCP_NOTSENT_LOWAT on both sides
authorWilly Tarreau <w@1wt.eu>
Tue, 29 Apr 2025 09:43:46 +0000 (11:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Apr 2025 10:13:42 +0000 (12:13 +0200)
commit2cdb3cb91e229a23d976fea3268b85a42427b20c
tree5d16027ceaa2a497b286eee27afa4f75046af10c
parent989f609b1a1cd0d7717864c8dad2d833d018208a
MINOR: tcp: add support for setting TCP_NOTSENT_LOWAT on both sides

TCP_NOTSENT_LOWAT is very convenient as it indicates when to report
EAGAIN on the sending side. It takes a margin on top of the estimated
window, meaning that it's no longer needed to store too many data in
socket buffers. Instead there's just enough to fill the send window
and a little bit of margin to cover the scheduling time to restart
sending. Experiments on a 100ms network have shown a 10-fold reduction
in the memory used by socket buffers by just setting this value to
tune.bufsize, without noticing any performance degradation. Theoretically
the responsiveness on multiplexed protocols such as H2 should also be
improved.
doc/configuration.txt
include/haproxy/global-t.h
src/cfgparse-global.c
src/proto_tcp.c
src/session.c