提交 9fa56a4d 编写于 作者: S Smilencer 提交者: neverchanje

feat(rocksdb): Select the option of Direct-IO in Rocksdb (#450)

上级 2dded9b7
......@@ -93,6 +93,28 @@ pegasus_server_impl::pegasus_server_impl(dsn::replication::replica *r)
_db_opts.pegasus_data = true;
// read rocksdb::Options configurations
_db_opts.use_direct_reads = dsn_config_get_value_bool(
"pegasus.server", "rocksdb_use_direct_reads", false, "rocksdb options.use_direct_reads");
_db_opts.use_direct_io_for_flush_and_compaction =
dsn_config_get_value_bool("pegasus.server",
"rocksdb_use_direct_io_for_flush_and_compaction",
false,
"rocksdb options.use_direct_io_for_flush_and_compaction");
_db_opts.compaction_readahead_size =
dsn_config_get_value_uint64("pegasus.server",
"rocksdb_compaction_readahead_size",
2 * 1024 * 1024,
"rocksdb options.compaction_readahead_size");
_db_opts.writable_file_max_buffer_size =
dsn_config_get_value_uint64("pegasus.server",
"rocksdb_writable_file_max_buffer_size",
1024 * 1024,
"rocksdb options.writable_file_max_buffer_size");
_db_opts.write_buffer_size =
(size_t)dsn_config_get_value_uint64("pegasus.server",
"rocksdb_write_buffer_size",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册