]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: cpu-topo: change "performance" to consider per-core capacity
authorWilly Tarreau <w@1wt.eu>
Tue, 13 May 2025 14:12:52 +0000 (16:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 13 May 2025 14:48:30 +0000 (16:48 +0200)
commit6c88e27cf4327ea95ab59fb4d478a21296987d36
tree29e7db3e31ccb86a0d21a73d36b19a4bcde24f92
parent5ab2c815f1b109df0554a890127ef7e5d4a421f7
MEDIUM: cpu-topo: change "performance" to consider per-core capacity

Running the "performance" policy on highly heterogenous systems yields
bad choices when there are sufficiently more small than big cores,
and/or when there are multiple cluster types, because on such setups,
the higher the frequency, the lower the number of cores, despite small
differences in frequencies. In such cases, we quickly end up with
"performance" only choosing the small or the medium cores, which is
contrary to the original intent, which was to select performance cores.
This is what happens on boards like the Orion O6 for example where only
the 4 medium cores and 2 big cores are choosen, evicting the 2 biggest
cores and the 4 smallest ones.

Here we're changing the sorting method to sort CPU clusters by average
per-CPU capacity, and we evict clusters whose per-CPU capacity falls
below 80% of the previous one. Per-core capacity allows to detect
discrepancies between CPU cores, and to continue to focus on high
performance ones as a priority.
doc/configuration.txt
src/cpu_topo.c