]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cpu-topo: boost the capacity of performance cores with cpufreq
authorWilly Tarreau <w@1wt.eu>
Fri, 14 Mar 2025 16:06:00 +0000 (17:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Mar 2025 17:30:30 +0000 (18:30 +0100)
commitc5ddf4a5b2a466cf19c5df63ef58baa907c292a4
treebb7f8b45b2fbb4eb939437d69abbac4b5108a866
parente4aa13e78687ae77b6263f97ed0244390adcf4b9
MINOR: cpu-topo: boost the capacity of performance cores with cpufreq

Cpufreq alone isn't a good metric on heterogenous CPUs because efficient
cores can reach almost as high frequencies as performant ones. Tests have
shown that majoring performance cores by 50% gives a pretty accurate
estimate of the performance to expect on modern CPUs, and that counting
+33% per extra SMT thread is reasonable as well. We don't have the info
about the core's quality, but using the presence of SMT is a reasonable
approach in this case, given that efficiency cores will not use it.

As an example, using one thread of each of the 8 P-cores of an intel
i9-14900k gives 395k rps for a corrected total capacity of 69.3k, using
the 16 E-cores gives 40.5k for a total capacity of 70.4k, and using both
threads of 6 P-cores gives 41.1k for a total capacity of 69.6k. Thus the
3 same scores deliver the same performance in various combinations.
src/cpu_topo.c