[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: bdb backend - reliable or not?



Owen DeLong wrote:
This may not be the politically correct thing to say here, but, it is my
experience and YMMV.

BDB is very stable and reliable, once you get the right combination of
configuration figured out.  There's lots of different things that need
to be set up to get BDB stable and many of them are less than obvious
in the installation process.

Running db_recover before EVERY startup is safe and, in my experience,
virtually necessary.  If the shutdown was clean, db_recover will quickly
figure out that it doesn't have to do anything and move on.

As pointed out before, running db_recover is not needed for current 2.3 releases. Also, running it when it is not needed will wipe out the BDB cache unnecessarily, which will cause server performance to be slower while the cache gets re-seeded.

Another important thing is to get DB_CONFIG set up correctly.


And as I've pointed out many times, in OpenLDAP, BDB does not use temporary files, so the set_tmp_dir directive is also unnecessary.

Here is my DB_DONRIG file:

# In Memory Cache Size
set_cachesize   0       8388608         0

# Database Flags
#set_flags DB_TXN_NOSYNC # Don't immediately flush txn logs. Dangerous


# Log Values
set_lg_regionmax        1048576
set_lg_max              10485760
set_lg_bsize            2097152
set_lg_dir              /var/lib/ldap/bdb-logs

# Temporary file location
set_tmp_dir             /tmp


Hope that helps.

Owen
--
 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/