]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/options: enable multiple rocksdb compaction threads for filestore 18232/head
authorJosh Durgin <jdurgin@redhat.com>
Tue, 10 Oct 2017 23:54:31 +0000 (19:54 -0400)
committerJosh Durgin <jdurgin@redhat.com>
Tue, 10 Oct 2017 23:57:57 +0000 (19:57 -0400)
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>
src/common/options.cc

index fa05f0850df3c666e05962aa2036e2a72a8864bf..f3d99913f3095ced3dd5af0635719b9d3bc0529a 100644 (file)
@@ -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")
     .set_description(""),
 
     Option("filestore_omap_backend", Option::TYPE_STR, Option::LEVEL_DEV)