1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-05 03:48:52 +01:00

fix: disable direct IO again

This commit is contained in:
Timo Kösters 2022-01-12 12:27:02 +01:00
parent 7f27af032b
commit 9e77f7617c
No known key found for this signature in database
GPG key ID: 356E705610F626D5

View file

@ -22,7 +22,7 @@ fn db_options(cache_capacity_bytes: usize, rocksdb_cache: &rocksdb::Cache) -> ro
// "Difference of spinning disk" // "Difference of spinning disk"
// https://zhangyuchi.gitbooks.io/rocksdbbook/content/RocksDB-Tuning-Guide.html // https://zhangyuchi.gitbooks.io/rocksdbbook/content/RocksDB-Tuning-Guide.html
block_based_options.set_block_size(64 * 1024); block_based_options.set_block_size(4 * 1024);
block_based_options.set_cache_index_and_filter_blocks(true); block_based_options.set_cache_index_and_filter_blocks(true);
let mut db_opts = rocksdb::Options::default(); let mut db_opts = rocksdb::Options::default();
@ -31,9 +31,9 @@ fn db_options(cache_capacity_bytes: usize, rocksdb_cache: &rocksdb::Cache) -> ro
db_opts.set_skip_stats_update_on_db_open(true); db_opts.set_skip_stats_update_on_db_open(true);
db_opts.set_level_compaction_dynamic_level_bytes(true); db_opts.set_level_compaction_dynamic_level_bytes(true);
db_opts.set_target_file_size_base(256 * 1024 * 1024); db_opts.set_target_file_size_base(256 * 1024 * 1024);
db_opts.set_compaction_readahead_size(2 * 1024 * 1024); //db_opts.set_compaction_readahead_size(2 * 1024 * 1024);
db_opts.set_use_direct_reads(true); //db_opts.set_use_direct_reads(true);
db_opts.set_use_direct_io_for_flush_and_compaction(true); //db_opts.set_use_direct_io_for_flush_and_compaction(true);
db_opts.create_if_missing(true); db_opts.create_if_missing(true);
db_opts.increase_parallelism(num_cpus::get() as i32); db_opts.increase_parallelism(num_cpus::get() as i32);
db_opts.set_max_open_files(512); db_opts.set_max_open_files(512);