From 6a5891344e3fc2509e3beacf63b0e1ce33c41db9 Mon Sep 17 00:00:00 2001 From: Carl Date: Wed, 19 Dec 2018 04:12:45 -0800 Subject: [PATCH] increase compaction and flush threads --- src/db_ledger.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db_ledger.rs b/src/db_ledger.rs index e9ab0c60c0c911..7a44637a0cd726 100644 --- a/src/db_ledger.rs +++ b/src/db_ledger.rs @@ -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 { @@ -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