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
common/options: enable multiple rocksdb compaction threads for filestore #18232
Conversation
One of the major benefits of rocksdb over leveldb is multithreaded compaction. The default of 1 thread does not provide much benefit, and is insufficient for heavy rgw workloads. For high-write and delete omap workloads I've seen up to 8 compaction threads be used. There's little overhead to having a higher max than are needed, so set the default to 8. Signed-off-by: Josh Durgin <jdurgin@redhat.com>
luminous backport: #18234 |
jewel backport included in #18010 |
@@ -3673,7 +3673,7 @@ std::vector<Option> get_global_options() { | |||
// filestore | |||
|
|||
Option("filestore_rocksdb_options", Option::TYPE_STR, Option::LEVEL_DEV) | |||
.set_default("compaction_readahead_size=2097152") | |||
.set_default("max_background_compactions=8;compaction_readahead_size=2097152") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, can we use ,
as the separator? to be consistent with other _rocksdb_options
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even though, "max_background_compactions" is still supported, but since rocksdb 5.6.0, max_background_compactions
is replaced with max_background_jobs
. to have 8 background compactions, we can specify "max_background_jobs=10", in which, 2 jobs will be allocated for "max_background_flushes".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, it's more backport-friendly. we can update it in master after it gets merged.
One of the major benefits of rocksdb over leveldb is multithreaded
compaction. The default of 1 thread does not provide much benefit, and
is insufficient for heavy rgw workloads.
For high-write and delete omap workloads I've seen up to 8 compaction
threads be used. There's little overhead to having a higher max than
are needed, so set the default to 8.
Signed-off-by: Josh Durgin jdurgin@redhat.com