[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ITS#3950
Howard Chu wrote:
Kurt D. Zeilenga wrote:
HEAD/re23 thr_posix.c match. That is, the patch suggested in
ITS#3950 was never applied to HEAD nor RE23. IIRC, Howard
reworked portions of slapd(8) so as not rely so heavily on
thread yielding. It's quite possible that some of these
changes haven't found there way into RE23.
I reworked most of the yield() calls in daemon.c, and those changes
are in RE23. However, the BDB library itself makes yield() calls as
well, which I ignored. It seems we should apply the patch in ITS#3950
after all.
Oops. The only reason my BDB library was making so many yield calls was
because I had configured it to use assembler test-and-set mutexes.
Rebuilding with posix-mutexes gets rid of that. (Of course that still
requires the threads library to support interprocess mutexes, which as I
recall are only available for Linux in NPTL/Linux 2.6.) Running test008
with fnccheck showed ~420000 yield calls, mostly coming from the BDB
library. After rebuilding BDB, that dropped to ~28000 calls, mainly
split between bdb_search (8800) and ldap_int_thread_pool_wrapper
(18000). The majority of yield calls in back-bdb are unnecessary and
I've removed them in HEAD. That leaves the 18000 in
ldap_int_thread_pool_wrapper to investigate. (The number is actually
18147, pretty constant from run to run which implies it is equal to the
total number of operations processed, i.e., one yield per request.
Probably worth removing if we can.)
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/