Skip to content

Commit

Permalink
WiP
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Aug 10, 2018
1 parent cb6196d commit 9dcec98
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ impl DBStore {
let mut db_opts = rocksdb::Options::default();
db_opts.create_if_missing(true);
// db_opts.set_keep_log_file_num(10);
db_opts.set_max_open_files(256);
db_opts.set_compaction_readahead_size(1 << 20);
db_opts.set_max_open_files(if opts.bulk_import { 16 } else { 256 });
db_opts.set_compaction_style(rocksdb::DBCompactionStyle::Level);
db_opts.set_compression_type(rocksdb::DBCompressionType::Snappy);
db_opts.set_target_file_size_base(256 << 20);
Expand All @@ -53,7 +52,7 @@ impl DBStore {
db_opts.set_advise_random_on_open(!opts.bulk_import); // bulk load uses sequential I/O

let mut block_opts = rocksdb::BlockBasedOptions::default();
block_opts.set_block_size(1 << 20);
block_opts.set_block_size(512 << 10);
DBStore {
db: rocksdb::DB::open(&db_opts, &opts.path).unwrap(),
opts,
Expand Down

0 comments on commit 9dcec98

Please sign in to comment.