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

#15646 BerkeleyDB hybrid mutexes



Fyi, hybrid mutex support in BDB 4.6.21 is still not a good idea on 2.6 Linux systems.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
--- Begin Message --- Clint Adams wrote:
On Mon, Sep 03, 2007 at 11:23:22PM -0700, Howard Chu wrote:
The test I used most recently was to run test008 in the OpenLDAP test suite and average the runtimes over 5-10 runs for each BDB version. In my tests I ran with SLAPD_DEBUG=0 so the only I/O traffic is from BDB and not from debug logging. I also ran with an extremely small cachesize setting (5, the default is 1000) to further aggravate the locking contention in the underlying DB. Under normal conditions (where the cache is not so ridiculously undersized for the workload) the differences are not as apparent.

Also note that the runtimes for this test are non-deterministic since they are affected by deadlock retries, and their pattern is unpredictable on most systems.

Does the hybrid mutex performance fix in db 4.6.21 solve this problem?

I've just rerun my tests using both BDB 4.2.52 and 4.6.21 and the behavior is as expected. On an otherwise idle machine, both perform well, completing our concurrency test in about 31 seconds.


With a CPU-hog running in the background, the test with BDB 4.2.52 takes only 37 seconds, while BDB 4.6.21 takes 1:42. Watching with top you can see that BDB 4.6.21 gets a lot less CPU than BDB 4.2.52. This is the problem with using yield() on an NPTL system - whereas on most POSIX systems yield() only yields control to some other thread in the current process, on NPTL yield() gives up the CPU for the entire process.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/




--- End Message ---