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

Re: openldap slowness...

It turned out that setting:

cachesize     50000
dbcachesize   5000000

Drastically improved performance.


On Aug 19, 2004, at 9:15 PM, Quanah Gibson-Mount wrote:

--On Thursday, August 19, 2004 6:35 PM -0400 John Von Essen <john@essenz.com> wrote:

With the following, my ldapmodify command is still slow. My ldif file has
about 5000 entries for users, and 5000 add/modify entries to add that
user to a cn with a uniquemember attribute. To make sure everything I
have in LDIF overwrites what in ldap, etc.,. I use the following commands:

ldapmodify -c -D "..." -w ... -S outfile -x -r -f ldif
ldapmodify -c -D "..." -w ... -x -a -f outfile

What version of OpenLDAP? Your original post doesn't say.

Is it BDB 4.2.52 with the two patches released for it? Your original post doesn't specify that.

Also, I suggest not using ldbm if you are on OpenLDAP 2.2.x. ldbm is a very old and less reliable technology for the database backend. A properly configured BDB server runs quite well.

I suggest adding your entire LDIF via slapadd (when slapd is not running) with:

set_flags DB_TXN_NOSYNC

in DB_CONFIG while doing the slapadd, and see how long it takes to load. If it takes a particularly long time, you may need to increase your BDB cache size.

I also suggest relocating your BDB log files to be created somewhere other than the location of the database files.

set_lg_dir <location> like:
set_lg_dir /var/log/bdb


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

John Von Essen (john@essenz.com)
President, Essenz Consulting (www.essenz.com)
Phone: (800) 248-1736
Fax: (800) 852-3387