[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#4249) Threads value warning

--On Wednesday, December 07, 2005 9:03 AM +0000 ando@sys-net.it wrote:

> On Tue, 2005-12-06 at 21:10 +0000, quanah@stanford.edu wrote:
>> Many people seem to abuse the "threads" directive in slapd.conf.  I
>> think the man page and/or slapd should include some warning when threads
>> is set to high numbers (say > 32).  I've seen some very odd/bizarre
>> thread values coming across through various postings (like 1,000 or
>> 10,000, etc).
> Sounds reasonable; I've applied a fix to HEAD.  BTW, I've dug out a
> piece of code I wrote to allow relatively portable CPU number detection
> on SMP architectures
> <http://mbdyn.aero.polimi.it/~masarati/Download/mbdyn/get_nprocs.c>
> it's GPL'ed, but as I'm the copyright holder and since it's very
> trivial, I think I could easily rework it to use in OpenLDAP.  Apart
> from agreeing on the "right" algorithm for slapd, could it be useful to
> spawn as many threads as the available CPUs when running in tool mode?

It might be useful to have it do that if someone hasn't specified a 
tool-threads parameter.  However, Howard found that at least some times, 
having more threads than CPU's is actually faster (on a 2 CPU system, 3 
threads finished faster than 2 or 4 for him).  So it depends somewhat on 
the number of indices as well.


Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html