I am upgrading from HAProxy 1.8 to 2.2. The release notes for 2.0.0 say:
much more scalable multi-threading, which is even enabled by default on
platforms where it was successfully tested ; by default, as many threads
are started as the number of CPUs haproxy is allowed to run on. This
removes a lot of configuration burden in VMs and containers ;
From what I understand, nbthread
will now automatically be set to the number of CPU cores. As an optimisation, my configs also contain the cpu-map
directive to bind threads to specific CPUs. It is not clear to me whether this now happens automatically as well. I am unable to find a default value for cpu-map
in the documentation. Could someone enlighten me?
All my configs contain the following statements:
nbproc 1
nbthread <number of CPU cores>
cpu-map auto:1/1-<number of CPU cores> 0-<number of CPU cores - 1>
E.g.:
nbproc 1
nbthread 4
cpu-map auto:1/1-4 0-3