1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 09:54:09 +01:00

Tweak DB options and progress bar a bit

This commit is contained in:
Roman Zeyde 2018-04-12 22:06:05 +03:00
parent 9996e3a4f7
commit 95ede83092
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB
2 changed files with 3 additions and 5 deletions

View File

@ -198,7 +198,7 @@ pub fn update(store: &mut Store, daemon: &Daemon) {
timer.stop();
blocks_size += buf.len();
if pb.inc() % 100 == 0 {
if pb.inc() % 1000 == 0 {
info!(
"{} @ {}: {:.3}/{:.3} MB, {} rows, {}",
blockhash_hex,

View File

@ -27,12 +27,10 @@ impl Store {
let mut db_opts = rocksdb::Options::default();
db_opts.create_if_missing(true);
db_opts.set_compaction_style(rocksdb::DBCompactionStyle::Level);
db_opts.set_max_open_files(256);
db_opts.set_use_fsync(false);
db_opts.set_compression_type(rocksdb::DBCompressionType::Snappy);
db_opts.set_target_file_size_base(128 << 20);
db_opts.set_write_buffer_size(256 << 20);
// db_opts.set_compaction_readahead_size(2 << 20);
db_opts.set_target_file_size_base(64 << 20);
db_opts.set_write_buffer_size(64 << 20);
db_opts.set_disable_auto_compactions(!opts.auto_compact);
let mut block_opts = rocksdb::BlockBasedOptions::default();