OpenLDAP Faq-O-Matic : OpenLDAP Software FAQ : Configuration : SLAPD Configuration : Backends : The BDB/HDB backend (How do I setup/configure back-bdb/back-hdb?) : How do I configure the BDB backend? | |
The BDB backend ("back-bdb") uses a lot of special features of Because back-bdb is transaction-based and uses write-ahead logging to ensure data consistency, it has much heavier I/O demands than back-ldbm. Also, the transaction log files accumulate as data is written to the directory, and these log files must be cleaned out periodically. Otherwise the log files will consume enormous amounts of disk space. The cleanup procedures are described in How to maintain Berkeley DB (logs etc.) ?. The information needed to fully understand things and to properly configure back-bdb is divided among the slapd-bdb(5) manual page and the Oracle BerkeleyDB documentation (http://www.oracle.com/technology/documentation/berkeley-db/db/index.html). You should read the entire slapd-bdb(5) manpage before proceeding. The only mandatory keyword is "directory" for setting the location of the database files. The other keywords control tradeoffs between data reliability, performance, and memory use. To ensure that committed transactions actually get flushed to disk, you should use the "checkpoint" keyword, otherwise your data is vulnerable to loss due to system failures. See the BerkeleyDB documentation for more information about checkpoints. (In fact, you should read all of chapter 9 "Berkeley DB Transactional Data Store Applications" in the BerkeleyDB reference manual. At least, read sections 1-3 and 13-24.) The "dbnosync" keyword is provided for compatibility with back-ldbm; the preferred method of setting this is to use the BDB DB_CONFIG file option set_flags DB_TXN_NOSYNC. The "lockdetect" keyword is also deprecated, you should instead use the BDB DB_CONFIG file set_lk_detect keyword. (It's safe to leave this at the default setting.) A number of important items must be configured in the BDB DB_CONFIG file and not in slapd.conf. You should, at least, read about these items:
| |
See also:
What are the DB_CONFIG configuration directives?
Why isn't all of this essential Sleepycat's BerkeleyDB documentation integrated directly into OpenLDAP's documentation?
| |
[Append to This Answer] |
Previous: | How do I setup the BDB backend? |
Next: | What are the DB_CONFIG configuration directives? |
|