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

Re: slapd and checkpoint





--On Monday, November 03, 2003 10:03 AM +0100 jehan procaccia <jehan.procaccia@int-evry.fr> wrote:

hello,

I am wondering if slapd is checkpointing the database at every start or
stop ?
If slapd.conf doesn't contain a "checkpoint" directive, there won't be
any checkpoint done ?
Mine doesn't contain one until now ... but db_archive tells me that only
the last log file is useful (log.0000000011), so I conclude that
checkpoints have ooccurred but when ? how can we check when the latest
checkpoint happened , and did it worked fine ?
With cyrus imapd (using bdb) we can check that, there's also a utility
that checkpoints/(recover ?) the databases at every start of the daemon:
START {
   # do not delete this entry!
   recover       cmd="ctl_cyrusdb -r"

Is it a good practice to do a db_recover before starting slapd ?

Jehan,

slapd by default checkpoints when it is stopped. However, if it crashes it won't checkpoint. I highly suggest using the "checkpoint" directive in slapd.conf to have it periodically checkpoint the database while it is running, so that in the case of a crash, slapd has been recently checkpointed. It also speeds up shutdown time, as there is less for slapd to checkpoint at that time. Running db_recover at startup can have other issues (it used to be the standard practice in slapd, but that was later removed).

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/TSS/Computing Systems
ITSS/TSS/Infrastructure Operations
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html