pub struct KvSeparationOptions {
pub compression: CompressionType,
/* private fields */
}Expand description
Options for key-value separation
Fields§
§compression: CompressionTypeWhat type of compression is used for blobs
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more