From 56740d05913ce3a2c4845d2b91dd848f46ddb9a2 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Tue, 10 Oct 2017 19:54:31 -0400 Subject: [PATCH] common/options: enable multiple rocksdb compaction threads for filestore 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 (cherry picked from commit 023fa810aa6b3af305e9027e3f717e54d1bb2712) Conflicts: src/common/options.cc (moved to config_opts.h) --- src/common/config_opts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index fabc2f7565650..5499456f65d08 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -872,7 +872,7 @@ OPTION(rocksdb_collect_extended_stats, OPT_BOOL, false) //For rocksdb, this beha OPTION(rocksdb_collect_memory_stats, OPT_BOOL, false) //For rocksdb, this behavior will be an overhead of 5%~10%, collected only rocksdb_perf is enabled. // rocksdb options that will be used for omap(if omap_backend is rocksdb) -OPTION(filestore_rocksdb_options, OPT_STR, "compaction_readahead_size=2097152") +OPTION(filestore_rocksdb_options, OPT_STR, "max_background_compactions=8;compaction_readahead_size=2097152") // rocksdb options that will be used in monstore OPTION(mon_rocksdb_options, OPT_STR, "write_buffer_size=33554432,compression=kNoCompression") -- 2.39.5