[Date Prev][Date Next]
BDB memory cache problem
Is there any way to turn off BDB memory_cacheing_to_disk ?
(__db.001 and other files) At least for write operations?
Most of the times this files causes data loss, when OS system crashes.
If I unterstand it right:
1. BDB waiting until memory buffer is full,
2. then write data to disk I/O buffer
3. then will be written data to *.bdb files.
Between 1 and 2 data is written to log.000000* file, but after OS recovering
there is always some data I can't read.
If OS fails and BDB memory buffer is not flushed, then data will loss. As I see this is
persistent problem in BDB over the time.
I know my problem is not strict OL specific, but I tried all DB_CONFIG option from sleepycat that
turns off memory cacheing, logging and so on. I always became:
DB_ENV->set_flags: direct I/O is not supported by this platform
# Cachesize (20Mb)
set_cachesize 0 20971520 1
# Automatically remove log files that are no longer needed.
# Just use these settings when doing slapadd...
(OL: 2.2.19, BDB: 4.2.52. + 2 patches, OS: Mandrake 10.0)
(SVN guys has similar problems with BDB. They started to use FSFS under SVN.)
Szuts Attila Linux Support Center Kft.