Struct tiny_lsm::Config [−][src]
pub struct Config {
pub max_space_amp: u64,
pub max_log_length: usize,
pub merge_ratio: u64,
pub merge_window: usize,
pub log_bufwriter_size: usize,
pub zstd_sstable_compression_level: u8,
}Fields
max_space_amp: u64If 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: usizeWhen 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: u64When 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: usizeWhen the background compactor thread looks for ranges of sstables to merge, it will require ranges to be at least this long.
log_bufwriter_size: usizeAll inserts go directly to a BufWriter wrapping the log
file. This option determines how large that in-memory buffer
is.
zstd_sstable_compression_level: u8The level of compression to use for the sstables with zstd.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more
