]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Add a new config option to forcibly run OSD benchmark on init
authorSridhar Seshasayee <sseshasa@redhat.com>
Thu, 24 Jun 2021 13:15:33 +0000 (18:45 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Fri, 30 Jul 2021 12:46:00 +0000 (18:16 +0530)
The new config option "osd_mclock_force_run_benchmark_on_init" is
introduced to allow a user to force run the OSD benchmark test on every
OSD boot-up even if the historical data about the OSD's iops capacity is
available on the MON config store. The 'force_run_benchmark' flag is set
to the value indicated by the new config option.

By default this new config option is set to false.

The utility of this option is to help refresh the OSD iops capacity
when the underlying device's performance characteristics have changed
significantly. In such cases, the OSD can be restarted with this option
enabled temporarily. Once the new iops capacity is updated to the MON
store, this option can be removed from the OSD's start-up config.

Fixes: https://tracker.ceph.com/issues/51464
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
src/common/options/osd.yaml.in
src/osd/OSD.cc

index d098e039edfa8cc3eaa72094832f47bd3a660626..bf990b70752f63f0c7ec071597a9b7b418e4b1d5 100644 (file)
@@ -1045,6 +1045,22 @@ options:
   default: 21500
   flags:
   - runtime
+- name: osd_mclock_force_run_benchmark_on_init
+  type: bool
+  level: advanced
+  desc: Force run the OSD benchmark on OSD initialization/boot-up
+  long_desc: This option specifies whether the OSD benchmark must be run during
+    the OSD boot-up sequence even if historical data about the OSD iops capacity
+    is available in the MON config store. Enable this to refresh the OSD iops
+    capacity if the underlying device's performance characteristics have changed
+    significantly. Only considered for osd_op_queue = mclock_scheduler.
+  fmt_desc: Force run 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:
+  - startup
 - name: osd_mclock_profile
   type: str
   level: advanced
index d94a690eece4b7803f9313d86f643999711b094c..b0518b6b9130ba09f94d5b6adc6d9647b70a3bd3 100644 (file)
@@ -10207,7 +10207,8 @@ void OSD::maybe_override_max_osd_capacity_for_qos()
   // osd bench test. This is later used to setup mclock.
   if (cct->_conf.get_val<std::string>("osd_op_queue") == "mclock_scheduler") {
     std::string max_capacity_iops_config;
-    bool force_run_benchmark = false;
+    bool force_run_benchmark =
+      cct->_conf.get_val<bool>("osd_mclock_force_run_benchmark_on_init");
 
     if (store_is_rotational) {
       max_capacity_iops_config = "osd_mclock_max_capacity_iops_hdd";