pub struct KvSeparationOptions { /* private fields */ }Expand description
Options for key-value separation
Implementations§
Source§impl KvSeparationOptions
impl KvSeparationOptions
Sourcepub fn compression(self, compression: CompressionType) -> Self
pub fn compression(self, compression: CompressionType) -> Self
Sets the blob compression method.
Sourcepub fn file_target_size(self, bytes: u64) -> Self
pub fn file_target_size(self, bytes: u64) -> Self
Sets the target size of blob files.
Smaller blob files allow more granular garbage collection which allows lower space amp for lower write I/O cost.
Larger blob files decrease the number of files on disk and maintenance overhead.
Defaults to 64 MiB.
Sourcepub fn separation_threshold(self, bytes: u32) -> Self
pub fn separation_threshold(self, bytes: u32) -> Self
Sets the key-value separation threshold in bytes.
Smaller value will reduce compaction overhead and thus write amplification, at the cost of lower read performance.
Defaults to 1 KiB.
Sourcepub fn staleness_threshold(self, ratio: f32) -> Self
pub fn staleness_threshold(self, ratio: f32) -> Self
Sets the staleness threshold percentage.
The staleness percentage determines how much a blob file needs to be fragmented to be picked up by the garbage collection.
Defaults to 33%.
Sourcepub fn age_cutoff(self, ratio: f32) -> Self
pub fn age_cutoff(self, ratio: f32) -> Self
Sets the age cutoff threshold.
Defaults to 20%.
Trait Implementations§
Source§impl Clone for KvSeparationOptions
impl Clone for KvSeparationOptions
Source§fn clone(&self) -> KvSeparationOptions
fn clone(&self) -> KvSeparationOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for KvSeparationOptions
impl Debug for KvSeparationOptions
Source§impl Default for KvSeparationOptions
impl Default for KvSeparationOptions
Source§impl PartialEq for KvSeparationOptions
impl PartialEq for KvSeparationOptions
impl StructuralPartialEq for KvSeparationOptions
Auto Trait Implementations§
impl Freeze for KvSeparationOptions
impl RefUnwindSafe for KvSeparationOptions
impl Send for KvSeparationOptions
impl Sync for KvSeparationOptions
impl Unpin for KvSeparationOptions
impl UnwindSafe for KvSeparationOptions
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