Struct lsm_tree::compaction::Levelled
source · pub struct Levelled {
pub l0_threshold: u8,
pub target_size: u32,
}
Expand description
Levelled compaction strategy (LCS)
If a level reaches a threshold, parts of it are merged into overlapping segments in the next level.
Each level Ln for n >= 1 can have up to ratio^n segments.
LCS suffers from high write amplification, but decent read & space amplification.
More info here: https://opensource.docs.scylladb.com/stable/cql/compaction.html#leveled-compaction-strategy-lcs
Fields§
§l0_threshold: u8
When the number of segments in L0 reaches this threshold, they are merged into L1
Default = 4
Same as level0_file_num_compaction_trigger
in RocksDB
target_size: u32
Target segment size (compressed)
Default = 64 MiB
Same as target_file_size_base
in RocksDB
Trait Implementations§
source§impl CompactionStrategy for Strategy
impl CompactionStrategy for Strategy
Auto Trait Implementations§
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnwindSafe for Strategy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more