]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Add config option to skip running the OSD benchmark on start-up.
authorSridhar Seshasayee <sseshasa@redhat.com>
Tue, 3 Aug 2021 08:33:26 +0000 (14:03 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Mon, 13 Sep 2021 11:04:24 +0000 (16:34 +0530)
Introduce a new dev config option "osd_mclock_skip_benchmark" that
when set skips running the OSD benchmark on start-up. By default
this option is disabled. This is useful in the following scenarios:

 - Dev/CI testing,
 - Configurations that don't need QoS.

If the option is enabled, the default OSD iops capacity is read from
osd_mclock_max_capacity_iops_[hdd,ssd].

Fixes: https://tracker.ceph.com/issues/52025
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
(cherry picked from commit 6ca32bde2e1d0dd58df168126582a570ac09aad6)

 Conflicts:
src/common/options/osd.yaml.in
 - Removed non-existent file: src/common/options/osd.yaml.in since the
   switch to yaml for config options is not available in pacific yet.

src/common/options.cc
src/osd/OSD.cc

index 5eab18040e6da783c8f44e589b7ce9d51120a21d..1f71079a8a218d0bcf075e747ba42959129a5c46 100644 (file)
@@ -3138,6 +3138,14 @@ std::vector<Option> get_global_options() {
     .add_see_also("osd_mclock_max_capacity_iops_hdd")
     .add_see_also("osd_mclock_max_capacity_iops_ssd"),
 
+    Option("osd_mclock_skip_benchmark", Option::TYPE_BOOL, Option::LEVEL_DEV)
+    .set_default(false)
+    .set_description("Skip the OSD benchmark on OSD initialization/boot-up")
+    .set_long_description("This option specifies whether the OSD benchmark must be skipped during the OSD boot-up sequence. Only considered for osd_op_queue = mclock_scheduler.")
+    .set_flag(Option::FLAG_RUNTIME)
+    .add_see_also("osd_mclock_max_capacity_iops_hdd")
+    .add_see_also("osd_mclock_max_capacity_iops_ssd"),
+
     Option("osd_mclock_profile", Option::TYPE_STR, Option::LEVEL_ADVANCED)
     .set_default("high_client_ops")
     .set_enum_allowed( { "balanced", "high_recovery_ops", "high_client_ops", "custom" } )
index 396bed55df1c1fee8c12c62453154fc276dcda9b..fbf1d51895452a35b6caaed08b14953900e8c004 100644 (file)
@@ -10110,7 +10110,8 @@ void OSD::maybe_override_max_osd_capacity_for_qos()
   // If the scheduler enabled is mclock, override the default
   // osd capacity with the value obtained from running the
   // osd bench test. This is later used to setup mclock.
-  if (cct->_conf.get_val<std::string>("osd_op_queue") == "mclock_scheduler") {
+  if ((cct->_conf.get_val<std::string>("osd_op_queue") == "mclock_scheduler") &&
+      (cct->_conf.get_val<bool>("osd_mclock_skip_benchmark") == false)) {
     std::string max_capacity_iops_config;
     bool force_run_benchmark =
       cct->_conf.get_val<bool>("osd_mclock_force_run_benchmark_on_init");