(Answer) (Category) OpenLDAP Faq-O-Matic : (Category) Trash : (Answer) How can I speed up database loading?

During database loading, disable write sync (see above), all ACLs, and all indexes. Use a RAM disk. Once ldapadd has finished, stop slapd and dump the database to an ldif, e.g.

ldbmcat id2entry.dbb > dump.ldif

Next, re-enable indexes in slapd.conf, and create all of the indexes by hand in parallel, e.g. in csh:

foreach i ( `grep ^index slapd.index.conf | awk '{ print $2 }'` )
   ldif2index -i dump.ldif $i &
end

Finally, move the DB to non-volatile media (e.g. hard disk), re-enable ACLs and possibly write sync, and restart slapd.


wes@umich.edu
[Append to This Answer]
Previous: (Answer) How can I do reduce cpu use
Next: (Answer) How do I integrate NS Calendar with slapd(8)?
This document is: http://www.openldap.org/faq/index.cgi?file=337
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
© Copyright 2004, OpenLDAP Foundation, info@OpenLDAP.org