Skip to main content

DEFAULT_WRITE_BUFFER_SIZE

Constant DEFAULT_WRITE_BUFFER_SIZE 

Source
pub(crate) const DEFAULT_WRITE_BUFFER_SIZE: usize = _; // 16_777_216usize
Expand description

Default write buffer size: 16 MiB (RocksDB default is 64 MiB).

Every flush writes a level-0 table, and while the database is small compaction rewrites it together with the whole database, so the number of flushes drives compaction writes. Under load a 2 MiB buffer flushed several times per session; 16 MiB halves compaction writes. With at most two write buffers, memtables use at most 32 MiB.