Browse Source
Reduce `max_open_files` to reduce RocksDB RAM usage
At 128MB per SST, we should have ~300 target files.
refactor-mempool
Roman Zeyde
7 years ago
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB
1 changed files with
1 additions and
1 deletions
-
src/store.rs
|
|
@ -43,7 +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(2048); |
|
|
|
db_opts.set_max_open_files(256); |
|
|
|
db_opts.set_compaction_readahead_size(1 << 20); |
|
|
|
db_opts.set_compaction_style(rocksdb::DBCompactionStyle::Level); |
|
|
|
db_opts.set_compression_type(rocksdb::DBCompressionType::Snappy); |
|
|
|