|OpenLDAP Faq-O-Matic : OpenLDAP Software FAQ : Configuration : SLAPD Configuration : Backends : The BDB/HDB backend (How do I setup/configure back-bdb/back-hdb?) : What are the DB_CONFIG configuration directives?|
| The DB_CONFIG file
The Berkeley Database backend retrieves most of its configuration and tuning options from the DB_CONFIG file (see http://www.sleepycat.com/docs/ref/env/db_config.html for details). This file should be placed in the same directory as specified by the directory configuration option in the slapd.conf file.
The tuning values displayed here are for my own environment. Your environment will likely require different options. Using the Berkeley Database tools, in particular db_stat(1), is a good method for determining what values are proper for you system.
While this FAQ has some good information on setting the Berkeley Database tuning options, the best place to find tuning documentation is in the online documentation provide by Sleepycat Software.
# # Set the database in memory cache size. # set_cachesize 0 52428800 0 # # Set database flags. # (for database loading/reindexing) #set_flags DB_TXN_NOSYNC # The above setting is not necessary in # OpenLDAP 2.3 and later. Use the -q flag # to slapadd and slapindex instead. # # Set log values. # set_lg_regionmax 1048576 set_lg_max 10485760 set_lg_bsize 2097152 set_lg_dir /usr/local/var/openldap-logsset_cachesize <gbytes> <bytes> <ncache>
Sets the database in memory cache size. See also How do I determine the proper BDB/HDB database cache size?. Database entries and indexes will be stored in this cache to avoid disk access during database read and write operations. Tuning this value can greatly effect your database performance. The parameters are:
<gbytes>: The number of gigabytes of memory to allocate to the cache.
<bytes>: The number of bytes of memory to allocate to the cache.
<ncache>: The number of cache segments to use. If this value is set to 0 or 1 then Berkeley DB will try to allocate one contiguous section of memory for the cache. If this value is greater than 1, the cache will be split into that number of segments.
The current cache size is set by <gbytes> plus <bytes> and has a limit of 4 gigabytes total.
|[Append to This Answer]|
|email@example.com, Kurt@OpenLDAP.org, firstname.lastname@example.org, email@example.com|
|Previous:||How do I configure the BDB backend?|
|Next:||Why isn't all of this essential Sleepycat's BerkeleyDB documentation integrated directly into OpenLDAP's documentation?|