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

Re: Drawbacks of Berkeley DB cache settings?





--On Thursday, June 26, 2003 2:02 PM +0200 Chris van der Merwe <chris@arnes.si> wrote:

I'm wondering if anyone on the list is familiar with the "inner-workings"
of the BDB, specifically my question is: Does enlarging the cache of the
BDB via DB_CONFIG pose any danger of updates to the directory being lost
in the event of a powerfailure or crash? I ask because I've managed to
greatly improve the results from OpenLDAP by making some fairly large
cache settings and I'm wondering if BDB has some mechanism to prevent
corruption in the event of a crash (with a large un-processed write
buffer).

Chris,

My understanding of BDB is that when new changes come in, they are written to the __db.* files. When slapd is stopped, or when the time/size of changes limit set in slapd.conf by the "checkpoint" attribute are hit, it will write any pending changes to the *.bdb files. After any crash, I recommend running db_recover. If there has been corruption problems caused by the crash, BDB will try to fix it.

As always, doing routine backups, and having a method of tracking changes is good. We have an event system here, so if we ever have to do a Point in Time restore, we can simply play back all the events from the time the backup image was created. So far, I've seen very few cases where I had an unrecoverable DB. Once was when the partition of the HD got corrupted, and the other times were self-inflicted.

--Quanah

--
Quanah Gibson-Mount
Senior Systems Administrator
ITSS/TSS/Computing Systems
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html