After extensive benchmarking by both Howard & I, it seems the default
value for the threads setting in OpenLDAP (16) is excessive for most
hardware. Unless someone has plenty of CPUs (at least 4+, not counting
fake HT CPUs), slapd performance is significantly improved by running
at 8 threads. Recent tests done by Howard indicated that dropping the
number of threads to 4 on my 2 CPU boxes further improved read
performance, but I haven't had the time to do the corresponding write
performance tests to see how they were impacted. In any case, the "8"
value is definitely better for both read & write performance for 1 & 2
CPU servers (and possibly 4, I just haven't had one to experiment on).
The only time I've found a need to increase the number of threads was
when I was benchmarking the Sun T2000, which had 32 cores. Given all
of this, I'd like to propose that we change
SLAP_MAX_WORKER_THREADS
in slap.h from 16 to 8 for OpenLDAP 2.4.
Thoughts?