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

common/options: enable multiple rocksdb compaction threads for filestore #18232

Merged
merged 1 commit into from Oct 19, 2017

Conversation

jdurgin
Copy link
Member

@jdurgin jdurgin commented Oct 11, 2017

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

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>
@jdurgin
Copy link
Member Author

jdurgin commented Oct 11, 2017

luminous backport: #18234

@jdurgin
Copy link
Member Author

jdurgin commented Oct 11, 2017

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")
Copy link
Contributor

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.

Copy link
Contributor

@tchaikov tchaikov Oct 11, 2017

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".

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants