(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) Trash : (Answer) Why is ldif2ldbm (database creation) so slow?
This answer is depreciated.

ldif2ldbm (versions 1.1.2 and later) automaticatically disable per operation cache-to-disk writing synchronization.

Normally slapd's backend database cache is sync'ed to disk on each LDAP write operations. Since creating a database is pure writing, ldif2ldbm (versions 1.1.1 and prior) has to sync every entry individually.

To keep this from happening, add the following (on a line of its own) to your slapd.conf.

dbCacheNoWSync
After you have created the database you should comment out this line by inserting a # in front of the option.

This can make an incredible speed difference (eg. 2000 entries can take about 3 hours with sync on or 3 minutes with sync off)!

Use dbcacheNoWsync with care. Disabling cache-to-disk write synchronization may result is lost of data or database corruption when slapd is abnormally terminated.
Another trick is to create your database on a virtual memory filesystem (MFS, tmpfs, or whatever) and then move the database to a disk filesystem (and changing slapd.conf appropriately) before cranking up slapd.
This will significantly decrease the time needed to create the database dramatically.
[Append to This Answer]
This document is: http://www.openldap.org/faq/index.cgi?file=41
[Search] [Appearance]
This is a Faq-O-Matic 2.721.test.
© Copyright 1998-2013, OpenLDAP Foundation, info@OpenLDAP.org