OPTIM: task: automatically adjust the default runqueue-depth to the threads
authorWilly Tarreau <w@1wt.eu>
Wed, 10 Mar 2021 10:06:26 +0000 (11:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 10 Mar 2021 10:15:34 +0000 (11:15 +0100)
commit060a7612487c244175fa1dc1e5b224015cbcf503
treec91f5e841e5bef537feda5b75715412380dbe8c3
parent1691ba3693d4b11cc85aed606d39ffbd23d8533f
OPTIM: task: automatically adjust the default runqueue-depth to the threads

The recent default runqueue size reduction appeared to have significantly
lowered performance on low-thread count configs. Testing various values
runqueue values on different workloads under thread counts ranging from
1 to 64, it appeared that lower values are more optimal for high thread
counts and conversely. It could even be drawn that the optimal value for
various workloads sits around 280/sqrt(nbthread), and probably has to do
with both the L3 cache usage and how to optimally interlace the threads'
activity to minimize contention. This is much easier to optimally
configure, so let's do this by default now.
doc/configuration.txt
include/haproxy/defaults.h
src/haproxy.c