1
0
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:
Roman Zeyde 2018-08-06 17:56:59 +03:00
parent d8e53246c4
commit 1c75b55b71
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -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);