]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: check: also consider the random other thread's active checks
authorWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 09:25:25 +0000 (11:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Sep 2023 06:26:06 +0000 (08:26 +0200)
commit016e189ea3ce3c1cfb02b6a4b9587bd6ed1c128d
tree402142f88fb9d450105a30522dc7e318df3f4352
parent00de9e08049dbb1749dded3a8d021875dd019678
MINOR: check: also consider the random other thread's active checks

When checking if it's worth transferring a sleeping thread to another
random thread, let's also check if that random other thread has less
checks than the current one, which is another reason for transferring
the load there.

This commit adds a function "check_thread_cmp_load()" to compare two
threads' loads in order to simplify the decision taking.

The minimum active check count before starting to consider rebalancing
the load was now raised from 2 to 3, because tests show that at 15k
concurrent checks, at 2, 50% are evaluated for rebalancing and 30%
are rebalanced, while at 3, this is cut in half.
src/check.c