Skip to main content

DEFAULT_GROUP_COMMIT_WINDOW_MS

Constant DEFAULT_GROUP_COMMIT_WINDOW_MS 

Source
pub const DEFAULT_GROUP_COMMIT_WINDOW_MS: u64 = 0;
Expand description

Default group-commit window.

0 = “no wait” — the background flusher fsyncs as soon as any writer’s pending commit arrives. Under single-writer workloads a non-zero window would be pure latency (no one to batch with), capping individual commit throughput at ~1000/s for window=1. Concurrent writers still batch naturally via the Mutex<WalWriter> contention path without needing an explicit timer.

Operators with many concurrent clients can raise this (e.g. 1-5ms) to amortise fsync cost across a bigger batch — at the cost of p99 tail latency going up by the window size.