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

Re: Fwd: [ldap] Implementation Suggestions

--On Friday, January 20, 2006 2:02 PM -0500 Daniel Henninger <daniel@ncsu.edu> wrote:
I'll attach all of these (and their components) that are actual  files.
The *.bdb files are:

-rw-------   1 root     other    54288384 Dec  2 23:54 dn2id.bdb
-rw-------   1 root     other    285081600 Dec  2 23:55 id2entry.bdb

What would be most useful here is the sum of the size of the two above files, and the sum the sizes of all the bdb files (this has two distinct purposes).

I am going to assume here that you are using Solaris on the SPARC cpu set.

On your indices.conf file, you have a lot of pres indices that are likely unnecessary (although I can't know for sure without knowing your usage patterns). Do you do a lot of:

XXX=* searches?

where XXX is the "pres" indexed attribute.

On your slapd.conf file:

You have no threads setting (I suggest threads 8) based on your configuration.
You have no idlcachesize setting
You are not using a shared memory key. This is *essential* for any type of reasonable performance from Solaris SPARC. Note this will entail setting up shared memory segments of an appropriate size in your /etc/system file.

See <http://www.stanford.edu/services/directory/openldap/configuration/slapd-conf-replica.html> for more about shm_key. On the /etc/system file bit, I do:


which ups the possible maximum size of shared memory segments from 8MB to 3GB (I have 4 GB of memory on my system). This does not mean that you have to use as much as it is configured to be.

On your DB_CONFIG file:

You BDB log files and your BDB database files appears to be on separate disks. This is a good thing. :)

On your set_cachesize setting:

For optimal performance while slapd is running, set_cachesize should not be smaller than the sum of dn2id.bdb and id2entry.bdb, and should be some offset larger than that sum (10%?) to account for write activity.

Using more than a single cache (you have 20) is known to negatively impact performance on Solaris as well.

My DB_CONFIG setting here is:

set_cachesize 2 536870912 1

I.e., 2.5 GB in a single cache. On 32 bit solaris, you can have up to 4GB in a single cache. All versions of BDB prior to 4.4 (and I recommend 4.2.52+patches) must have multiple caches after 4GB. I would heavily recommend against splitting up into multiple caches as long as you are below the 4GB mark.

For optimal performance while slapadd'ing a database, set_cachesize should be as large as, or lager than, the sum of all your *.bdb files

As an additional note, in OpenLDAP 2.2, the syncrepl portion was in the slapd code, which significantly impacted all operations. For OpenLDAP 2.3, this was extracted outside of the core slapd code, which gives you a performance gain.

Hope this helps,

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