@ -13,8 +13,6 @@ use solana_client::rpc_request::RpcTransactionStatus;
|
|||||||
use solana_sdk::{clock::Slot, signature::Signature};
|
use solana_sdk::{clock::Slot, signature::Signature};
|
||||||
use std::{collections::HashMap, fs, marker::PhantomData, path::Path, sync::Arc};
|
use std::{collections::HashMap, fs, marker::PhantomData, path::Path, sync::Arc};
|
||||||
|
|
||||||
// A good value for this is the number of cores on the machine
|
|
||||||
const TOTAL_THREADS: i32 = 8;
|
|
||||||
const MAX_WRITE_BUFFER_SIZE: u64 = 256 * 1024 * 1024; // 256MB
|
const MAX_WRITE_BUFFER_SIZE: u64 = 256 * 1024 * 1024; // 256MB
|
||||||
|
|
||||||
// Column family for metadata about a leader slot
|
// Column family for metadata about a leader slot
|
||||||
@ -727,8 +725,7 @@ fn get_db_options() -> Options {
|
|||||||
let mut options = Options::default();
|
let mut options = Options::default();
|
||||||
options.create_if_missing(true);
|
options.create_if_missing(true);
|
||||||
options.create_missing_column_families(true);
|
options.create_missing_column_families(true);
|
||||||
options.increase_parallelism(TOTAL_THREADS);
|
// A good value for this is the number of cores on the machine
|
||||||
options.set_max_background_flushes(4);
|
options.increase_parallelism(sys_info::cpu_num().unwrap() as i32);
|
||||||
options.set_max_background_compactions(4);
|
|
||||||
options
|
options
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user