Skip to content

Commit

Permalink
increase compaction and flush threads
Browse files Browse the repository at this point in the history
  • Loading branch information
carllin committed Dec 19, 2018
1 parent 2f5a99d commit 6a58913
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/db_ledger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::path::Path;

pub const DB_LEDGER_DIRECTORY: &str = "rocksdb";
// A good value for this is the number of cores on the machine
pub const TOTAL_THREADS: i32 = 4;
pub const TOTAL_THREADS: i32 = 8;

#[derive(Debug, PartialEq, Eq)]
pub enum DbLedgerError {
Expand Down Expand Up @@ -583,8 +583,8 @@ impl DbLedger {
options.create_if_missing(true);
options.create_missing_column_families(true);
options.increase_parallelism(TOTAL_THREADS);
options.set_max_background_flushes(2);
options.set_max_background_compactions(2);
options.set_max_background_flushes(4);
options.set_max_background_compactions(4);
options.set_max_write_buffer_number(32);
options.set_write_buffer_size(512 * 1024 * 1024);
options
Expand Down

0 comments on commit 6a58913

Please sign in to comment.