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 14:11:58 +0000 (15:11 +0100)
commit20076a05dd699b784e44872e74c538d0a4c075e4
treecd3b94ea84ab22984fc06c378c500e8821852ec2
parent4a8fbbd6d4e508c3e2b10cc8f03b4e85a40b4912
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.

(cherry picked from commit 060a7612487c244175fa1dc1e5b224015cbcf503)
Signed-off-by: Willy Tarreau <w@1wt.eu>
doc/configuration.txt
include/haproxy/defaults.h
src/haproxy.c