pub struct StorageOptions {
pub max_open_files: i32,
pub keep_log_file_num: usize,
pub write_buffer_size_bytes: Option<usize>,
pub max_write_buffer_number: Option<i32>,
pub bloom_filter_bits_per_key: Option<i32>,
}Expand description
Operator-tunable rocksdb options. Defaults match what
RocksDbStorageEngine::open applied historically (modest
max_open_files, capped LOG retention) — production
deployments override via the [storage] config section.
Fields§
§max_open_files: i32Cap on open SST files. RocksDB’s default of -1 keeps every SST in the table cache forever, which blows past typical FD soft limits in CI / test setups. 64 is plenty for the hot set in the foundational test suites; bump for production read-heavy workloads.
keep_log_file_num: usizeMaximum number of historical INFO log files to keep on disk. RocksDB’s default is 1000 which produces a long tail of LOG.old.* files that compounds disk pressure when many databases run in parallel.
write_buffer_size_bytes: Option<usize>Per-column-family memtable size (write buffer). Bigger
= fewer L0 files + more memory per CF. RocksDB’s default
is 64MB; tuning below that helps small / many-tenant
deployments, above for write-heavy single-tenant ones.
None keeps the upstream default.
max_write_buffer_number: Option<i32>Maximum number of memtables before writes stall. Bigger
= more headroom for write bursts at the cost of memory.
RocksDB’s default is 2; 4-8 is common for write-heavy
loads. None keeps the upstream default.
bloom_filter_bits_per_key: Option<i32>Bloom filter bits per key on the block-based table
format. Bigger = lower false-positive rate on point
reads at the cost of memory. RocksDB’s default builds
no bloom filter unless explicitly configured; 10 bits
gives ~1% FP rate and is the typical recommendation.
None keeps the upstream default (no bloom filter).
Trait Implementations§
Source§impl Clone for StorageOptions
impl Clone for StorageOptions
Source§fn clone(&self) -> StorageOptions
fn clone(&self) -> StorageOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more