1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-23 22:56:55 +01:00

Increase intermediate and final SSTable sizes

Otherwise, there are more than 1K files, causing full compaction to fail
(due to `ulimit -n` being 1024 by default).
This commit is contained in:
Roman Zeyde 2018-06-26 22:53:21 +03:00
parent e7e9a4bd34
commit 7832be013d
No known key found for this signature in database
GPG key ID: 87CAE5FA46917CBB

View file

@ -42,8 +42,10 @@ impl DBStore {
db_opts.create_if_missing(true);
db_opts.set_compaction_style(rocksdb::DBCompactionStyle::Level);
db_opts.set_compression_type(rocksdb::DBCompressionType::Snappy);
db_opts.set_target_file_size_base(64 << 20);
db_opts.set_target_file_size_base(128 << 20);
db_opts.set_write_buffer_size(64 << 20);
db_opts.set_min_write_buffer_number(2);
db_opts.set_max_write_buffer_number(3);
db_opts.set_disable_auto_compactions(opts.bulk_import);
let mut block_opts = rocksdb::BlockBasedOptions::default();