From f35b16f246046536863d89ac10a14a4433dcae47 Mon Sep 17 00:00:00 2001 From: sdong Date: Wed, 3 Aug 2016 16:02:41 -0700 Subject: [PATCH] db_bench add an option of --base_background_compactions Summary: As title. Test Plan: Run the benchmark with and without the parameter. Reviewers: yiwu, andrewkr, lightmark, IslamAbdelRahman Reviewed By: IslamAbdelRahman Subscribers: leveldb, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D61491 --- tools/db_bench_tool.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/db_bench_tool.cc b/tools/db_bench_tool.cc index 37f476af9..6af20ba85 100644 --- a/tools/db_bench_tool.cc +++ b/tools/db_bench_tool.cc @@ -303,6 +303,11 @@ DEFINE_int32(max_background_compactions, "The maximum number of concurrent background compactions" " that can occur in parallel."); +DEFINE_int32(base_background_compactions, + rocksdb::Options().base_background_compactions, + "The base number of concurrent background compactions" + " to occur in parallel."); + DEFINE_uint64(subcompactions, 1, "Maximum number of subcompactions to divide L0-L1 compactions " "into."); @@ -2524,6 +2529,7 @@ class Benchmark { FLAGS_min_write_buffer_number_to_merge; options.max_write_buffer_number_to_maintain = FLAGS_max_write_buffer_number_to_maintain; + options.base_background_compactions = FLAGS_base_background_compactions; options.max_background_compactions = FLAGS_max_background_compactions; options.max_subcompactions = static_cast(FLAGS_subcompactions); options.max_background_flushes = FLAGS_max_background_flushes;