]> 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>
Wed, 1 Sep 2021 08:49:03 +0000 (14:19 +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>
src/common/options/osd.yaml.in
src/osd/OSD.cc

index bf990b70752f63f0c7ec071597a9b7b418e4b1d5..e5ce3648e921c94c2ba8b7fb56c147f6d074935b 100644 (file)
@@ -1061,6 +1061,19 @@ options:
   - osd_mclock_max_capacity_iops_ssd
   flags:
   - startup
+- name: osd_mclock_skip_benchmark
+  type: bool
+  level: dev
+  desc: Skip the OSD benchmark on OSD initialization/boot-up
+  long_desc: This option specifies whether the OSD benchmark must be skipped during
+    the OSD boot-up sequence. Only considered for osd_op_queue = mclock_scheduler.
+  fmt_desc: Skip the OSD benchmark on OSD initialization/boot-up
+  default: false
+  see_also:
+  - osd_mclock_max_capacity_iops_hdd
+  - osd_mclock_max_capacity_iops_ssd
+  flags:
+  - runtime
 - name: osd_mclock_profile
   type: str
   level: advanced
index b0518b6b9130ba09f94d5b6adc6d9647b70a3bd3..6c8552f55a1c8a5406c08fac43b0e3346dd8d7b3 100644 (file)
@@ -10205,7 +10205,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");