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

slapadd/bdb tuning newbie



Ok, I admit it, when I go through the BDB docs, they are pretty daunting to me regarding how to effectively "tune" openldap for various things.

I imported about 750,000 records in to the db using slapadd. It took over 52 hours - so I am not tuning something right, but I am really not sure what I set wrong or maybe didn't include.

Maybe someone can help? (I did search the internet, FAQ, previous posts, etc - most of the hours I spent reading how no one will suggest any DB_CONFIG settings for many good reasons, but still the pain is high for me so far to be able to do this effectively).

I am running openldap 2.1.22 and BDB 4.1.(latest) as this is what ships currently on OS X 10.3 stock. Xserve 1.0 Gh Dual CPU with 2 Gb RAM.

Here is the slapd.conf entry for that DB that I set up (I have 3 separate DB in the file) (yes I need all those indexes)

database bdb
suffix "o=Apple"
rootdn "cn=Manager,o=apple"
directory /ngs/app/openldap2/apple_openldap/var/openldap-data/db/apple

# cachesize = number of entries to hold in memory
cachesize 20000

# checkpoint <Kbytes> to translog or <mins> passed since last checkpoint whichever is first
checkpoint 512 60

index objectClass eq
index appleareacode sub
index applecountrycode sub
index appledsid eq
index applefloor sub
index applenickname sub
index applephonesearch sub
index applepostaladdress sub
index applerelatedgivenname sub
index applerelatedsn sub
index applerelationtype sub
index applesearchtext sub
index buildingname sub
index c sub
index cn eq,sub
index description sub
index destinationindicator sub
index givenName sub
index l sub
index mail sub
index manager eq
index ou sub
index sn sub
index st sub
index street sub


and here is the DB_CONFIG I used:

(I picked these based on a first attempt to get it to be faster than with no config since everything I have ever read says you better have one.)

#
# Set the database in memory cache size.
#

set_cachesize 0 52428800 0


#
# Set database flags.
#
# comment this out after doing slapadd...
set_flags DB_TXN_NOSYNC

#
# Set log values.
#
set_lg_regionmax 1048576
set_lg_max 10485760
set_lg_bsize 2097152
set_lg_dir /ngs/app/openldap2/apple_openldap/var/openldap-data/db/txlogs/apple


#
# Set temporary file creation directory.
#
set_tmp_dir /tmp



/end