[Date Prev][Date Next]
Re: Write changed immediately to disk
On Mon, 18 Feb 2008, Chris G. Sellers wrote:
Is this more of an OS issue versus an OpenLDAP issue? Since OpenLDAP does
not have raw access to the physical disk, it depends on the OS to flush it's
buffers, so hitting reset on a system like that may cause things to get lost
in the cache/buffer for the file system??
That's what the fsync() and fdatasync() system calls are for. The
Berkeley DB library uses them in the transaction-commit operation to tell
the OS that the transaction log data should be forced to permanent storage
so that durability is guaranteed. That can be disabled in the DB library
using lines in the DB_CONFIG file:
or the "dbnosync" option in the slapd.conf, which sets the DB_TXN_NOSYNC
If none of those is present, then the problem is the OS or hardware.
IIRC, many UNIX variants don't *really* guarantee flushing permanent
storage unless you disable the disk's write-cache...and even then, some