mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 01:43:29 +01:00
Reduce max_open_files
to reduce RocksDB RAM usage
At 128MB per SST, we should have ~300 target files.
This commit is contained in:
parent
d8e53246c4
commit
1c75b55b71
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user