Skip to content
Snippets Groups Projects
Commit b26c593a authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

adjust max rocksdb LOG files based on hard drive or SSD option


keeps 3 LOG files at most if on hard drive, else keeps 20

Signed-off-by: default avatarstrawberry <strawberry@puppygock.gay>
parent 86de6497
No related branches found
No related tags found
No related merge requests found
......@@ -59,11 +59,13 @@ fn db_options(rocksdb_cache: &rocksdb::Cache, config: &Config) -> rocksdb::Optio
db_opts.set_compaction_readahead_size(2 * 1024 * 1024); // default compaction_readahead_size is 0 which is good for SSDs
db_opts.set_target_file_size_base(256 * 1024 * 1024); // default target_file_size is 64MB which is good for SSDs
db_opts.set_optimize_filters_for_hits(true); // doesn't really seem useful for fast storage
db_opts.set_keep_log_file_num(3); // keep as few LOG files as possible for spinning hard drives. these are not really important
} else {
db_opts.set_skip_stats_update_on_db_open(false);
db_opts.set_max_bytes_for_level_base(512 * 1024 * 1024);
db_opts.set_use_direct_reads(true);
db_opts.set_use_direct_io_for_flush_and_compaction(true);
db_opts.set_keep_log_file_num(20);
}
db_opts.set_block_based_table_factory(&block_based_options);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment