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

Re: back-bdb performance/configuration: Suggestions?





--On Friday, May 02, 2003 10:58 AM -0400 Frank Swasey <Frank.Swasey@uvm.edu> wrote:

Hey folks,
  I've read all I can find to read.  I think I've done my homework.  But
it still performs like a dog.  So, I'll describe what I have and then
ask for suggestions on how to improve it.

Machine:
  600MHz Pentium III, 256MB memory, 1 20GB IDE drive

OS:
  RedHat Linux 8.0

OpenLDAP:
  2.1.17
	built on the system
	compiled with LDBM/Berkeley and BDB

BDB: 4.1.25 patch 1

Testing: Load the same ~55000 entry LDIF file (hierarchically sorted)
five (5) times (using slapadd) and average the numbers.

Both back-ldbm and back-bdb were configured with the same indexes in
slapd.conf.

back-ldbm had the following DB_CONFIG file:
set_cachesize 0 104857600 2
set_flags DB_TXN_NOSYNC
set_lg_bsize 2097152

back-bdb had the following DB_CONFIG file:
set_cachesize 0 104857600 2
set_flags DB_TXN_NOSYNC
set_lg_bsize 2097152
set_lg_regionmax 262144
set_lg_dir /usr/local/ldap/dbtmp
set_tmp_dir /usr/local/ldap/dbtmp

back-ldbm used /usr/local/ldap/ldap.ldbm as the directory
back-bdb used /usr/local/ldap/ldap.bdb as the directory

back-bdb:
slapadd -c /etc/openldap/slapd.conf.bdb -l sample.ldif averaged 45m09s

back-ldbm:
slapadd -c /etc/openldap/slapd.conf.ldbm -l sample.ldif averaged 10m24s

So, obviously, 4.5x1 is not a good ratio.  Also, obviously, this
hardware is not up to doing a slapadd of that many entries using
back-bdb.  What is recommended to improve the performance of back-bdb?
More memory?  More spindles?  Stick with LDBM?

Frank,

Interesting to see the difference in load times, but what I don't see here is how this is a measure of the performance of back-bdb in answering queries. I.e., I'm not convinced that time to load a database is an indication how the DB will perform in answering queries (in fact, my testing for our setup did not indicate that there was any relation between the two). Also, how many indexes are you indexing? There is a bug in 2.1.17 if you have over 50 or so indexes with back-bdb, that will be fixed in 2.1.18 (or I have a patch I can send you if you are interested). I can tell you, that to load our account LDIF (which has 70,221 entries and is 72MB in size) takes approximately 11 minutes via slapadd with BDB.

The one major thing I see with your configuration, is that your logfiles & temporary files appear to be going to the same partition as your BDB database. The point of seperating those files out is not that they be in a different directory than the BDB database, but (preferably) on a completely different disk than the BDB database. Since you only have 1 drive, I don't see that that is a possibility. Have you tried putting them on different partitions?

--Quanah

--
Quanah Gibson-Mount
Senior Systems Administrator
ITSS/TSS/Computing Systems
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html