]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: peers: don't even try to process updates under contention
authorWilly Tarreau <w@1wt.eu>
Tue, 9 Sep 2025 15:51:39 +0000 (17:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Sep 2025 15:56:37 +0000 (17:56 +0200)
commitd7696d11e140446c283d69c0e4af3efcb471b318
tree55ab37d1a954147985181e821b931b34fb0882cd
parentd5e7fba5c035a5a2b5f1136be2d2de70d529b118
MEDIUM: peers: don't even try to process updates under contention

Recent fix 2421c3769a ("BUG/MEDIUM: peers: don't fail twice to grab the
update lock") improved the situation a lot for peers under locking
contention but still not enough for situations with many peers and
many entries to expire fast. It's indeed still possible to trigger
warnings at end of injection sessions for 16 peers at 100k req/s each
doing 10 random track-sc when process_table_expire() runs and holds the
update lock if compiled with a high value of STKTABLE_MAX_UPDATES_AT_ONCE
(1000). Better just not insist in this case and postpone the update.

At this point, under load only ebmb_lookup() consumes CPU, other functions
are in the few percent, indicating reasonable contention, and peers remain
updated.

This should be backported to 3.2 after a bit of testing.
src/peers.c