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: u64

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: u64

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: usize

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: usize

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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.