Add a doc for optimize_level_style_compaction method (#392)

master
Nikolay Volf 5 years ago committed by GitHub
parent 24e016a57d
commit 122cf3ffea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      src/db_options.rs

@ -217,6 +217,22 @@ impl Options {
} }
} }
/// Optimize level style compaction.
///
/// Default values for some parameters in `Options` are not optimized for heavy
/// workloads and big datasets, which means you might observe write stalls under
/// some conditions.
///
/// This can be used as one of the starting points for tuning RocksDB options in
/// such cases.
///
/// Internally, it sets `write_buffer_size`, `min_write_buffer_number_to_merge`,
/// `max_write_buffer_number`, `level0_file_num_compaction_trigger`,
/// `target_file_size_base`, `max_bytes_for_level_base`, so it can override if those
/// parameters were set before.
///
/// It sets buffer sizes so that memory consumption would be constrained by
/// `memtable_memory_budget`.
pub fn optimize_level_style_compaction(&mut self, memtable_memory_budget: usize) { pub fn optimize_level_style_compaction(&mut self, memtable_memory_budget: usize) {
unsafe { unsafe {
ffi::rocksdb_options_optimize_level_style_compaction( ffi::rocksdb_options_optimize_level_style_compaction(

Loading…
Cancel
Save