]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: haload: fix CPU topology detection by omitting forced "nbthread"
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 24 Jul 2026 10:06:23 +0000 (12:06 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 24 Jul 2026 10:10:47 +0000 (12:10 +0200)
commitbe66535ab904ed76d8c8165249ab0db5a570e359
treedde0147a6f92af3c406d368b44731dab13de9731
parentde3b107cb11a4f6f6464804f1c6ceebbd0490f54
BUG/MINOR: haload: fix CPU topology detection by omitting forced "nbthread"

Always writing "nbthread" in the generated global configuration forced a
static thread count, preventing HAProxy from using its automatic CPU
topology detection and correct core binding. This caused severe performance
degradation on large multi-core machines. Fix this by omitting the "nbthread"
directive when -t is not explicitly specified, while ensuring <arg_thrd>
is properly initialized to global.nbthread for internal calculations such as
connection and request rates.

Also ensure <arg_thrd> <= <arg_usr> when -R is specified for internal
calculations.
src/haload.c
src/haload_init.c