WAL And Durability
Durability settings decide when DataVo is allowed to acknowledge a write. The fastest setting is not always the safest setting, so benchmark numbers should always be read with the durability mode attached.
Disk mode can use WAL with normal buffered writes.
using var db = new DataVoContext(new DataVoConfig
{
StorageMode = StorageMode.Disk,
DiskStoragePath = "./datavo_data",
WalEnabled = true,
SyncDiskWrites = false
});Turn on synchronous disk writes when the workload needs a stronger flush setting.
using var db = new DataVoContext(new DataVoConfig
{
StorageMode = StorageMode.Disk,
DiskStoragePath = "./datavo_data",
WalEnabled = true,
SyncDiskWrites = true
});LSM strict mode waits for WAL durability before acknowledging writes. This is the conservative production-style setting.
using var db = new DataVoContext(new DataVoConfig
{
StorageMode = StorageMode.Lsm,
DiskStoragePath = "./datavo_lsm_strict",
LsmStrictFsync = true
});LSM relaxed mode acknowledges after the OS-buffered WAL append path. It is appropriate for caches, rebuildable data, and benchmark ceilings, but recent acknowledged writes can be lost on power or kernel failure.
using var db = new DataVoContext(new DataVoConfig
{
StorageMode = StorageMode.Lsm,
DiskStoragePath = "./datavo_lsm_relaxed",
LsmStrictFsync = false
});When documenting or comparing results, include the storage mode and durability setting next to the number.
Good:
DataVo LSM Relaxed, 1-thread throughput: 1,215,413 ops/s
Misleading:
DataVo throughput: 1,215,413 ops/sDurability Support Summary
Supported: disk WAL (WalEnabled, on by default for disk mode), disk sync writes (SyncDiskWrites = true), LSM strict fsync (LsmStrictFsync = true, which waits for WAL durability before acknowledging writes), LSM relaxed OS-buffered mode (faster, but can lose recent writes on power or kernel failure), and WAL checkpoint settings. Relaxed throughput must not be presented as strict durability.