pub struct Config {
pub max_space_amp: u8,
pub max_log_length: usize,
pub merge_ratio: u8,
pub merge_window: u8,
pub log_bufwriter_size: u32,
pub zstd_sstable_compression_level: u8,
}
Fields§
§max_space_amp: u8
If on-disk uncompressed sstable data exceeds in-memory usage by this proportion, a full-compaction of all sstables will occur. This is only likely to happen in situations where multiple versions of most of the database’s keys exist in multiple sstables, but should never happen for workloads where mostly new keys are being written.
max_log_length: usize
When the log file exceeds this size, a new compressed and compacted sstable will be flushed to disk and the log file will be truncated.
merge_ratio: u8
When the background compactor thread looks for contiguous
ranges of sstables to merge, it will require all sstables
to be at least 1/merge_ratio
* the size of the first sstable
in the contiguous window under consideration.
merge_window: u8
When the background compactor thread looks for ranges of sstables to merge, it will require ranges to be at least this long.
log_bufwriter_size: u32
All inserts go directly to a BufWriter
wrapping the log
file. This option determines how large that in-memory buffer
is.
zstd_sstable_compression_level: u8
The level of compression to use for the sstables with zstd.