]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: pools: move the needed_avg counter over a few buckets
authorWilly Tarreau <w@1wt.eu>
Mon, 24 Jul 2023 14:18:25 +0000 (16:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Aug 2023 17:04:34 +0000 (19:04 +0200)
commitda6999f83901ed176d3da14d75bc782353a4faa3
treebaa6eb344801fcf2240ca9702a3e78ca77694f85
parent9e5eb586b18a0176a5f5c237b5fa27948accb798
MEDIUM: pools: move the needed_avg counter over a few buckets

That's the same principle as for ->allocated and ->used. Here we return
the summ of the raw values, so the result still needs to be fed to
swrate_avg(). It also means that we now use the local ->used instead
of the global one for the calculations and do not need to call pool_used()
anymore on fast paths. The number of samples should likely be divided by
the number of buckets, but that's not done yet (better observe first).

A function pool_needed_avg() was added to report aggregated values for
the "show pools" command.

With this change, an h2load made of 5 * 160 conn * 40 streams on 80
threads raised from 1.5M RPS to 6.7M RPS.
include/haproxy/pool-t.h
include/haproxy/pool.h
src/pool.c