Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 9 commits into from
Jan 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/server/pegasus_server_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Smityz marked this conversation as resolved.
Show resolved Hide resolved
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",
Expand Down