Skip navigation

STANFORD UNIVERSITY

INFORMATION TECHNOLOGY SERVICES

Directory

This page contains the generic information for configuring DB_CONFIG for BDB. Version specific information can be found at specific BDB DB_CONFIG notes.

This is the DB_CONFIG file we use on our Linux OpenLDAP servers:

set_cachesize 4 0 1
set_lg_regionmax 262144
set_lg_bsize 2097152
set_lg_dir /var/log/bdb
#
# Automatically remove log files that are no longer needed.
set_flags DB_LOG_AUTOREMOVE
#
# Setting set_tas_spins reduces resource contention from multiple clients on systems with multiple CPU's.
set_tas_spins 1

For more information about the first 3 settings, see:
set_cachesize
set_lg_regionmax
set_lg_bsize

For more information about the set_tas_spins setting, see:
Howard Chu's message on this setting
Oracle's tuning guide
set_tas_spins

We split the log files out into a seperate directory, that is on a seperate HD from the DB deliberately. Testing has shown that doing this dramatically decrease the amount of time it takes to slapadd and slapindex databases. This is because of the IO overhead incurred when BDB tries to write to both the log files and the database index files when doing these loads.

The OpenLDAP Guidelines for configuring BDB are also a must read.

General notes:

  • The largest single partition size in BDB is 4 GB (4 0 1). To create larger sizes, they must be no larger than 4GB per section (8 0 2) and (10 0 4) for example.

  • Due to a restriction in the 32-bit Linux kernel, it is impossible to create shared memory segments larger than 1.9GB on 32-bit Linux systems. BDB also seems to have a 2GB memory limit restriction in creating shared memory partitions. This means that if you select 2 0 2, it will not be happy (A 2GB memory area seperated into two 1 GB segments).

Last modified Wednesday, 06-Dec-2006 02:09:41 PM

Stanford University Home Page