From: Sridhar Seshasayee Date: Thu, 24 Jun 2021 13:15:33 +0000 (+0530) Subject: osd: Add a new config option to forcibly run OSD benchmark on init X-Git-Tag: v17.1.0~1244^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8725a1088098aa6f389b87f8db0989693d869c1b;p=ceph.git osd: Add a new config option to forcibly run OSD benchmark on init 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 --- diff --git a/src/common/options/osd.yaml.in b/src/common/options/osd.yaml.in index d098e039edfa..bf990b70752f 100644 --- a/src/common/options/osd.yaml.in +++ b/src/common/options/osd.yaml.in @@ -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 diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d94a690eece4..b0518b6b9130 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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("osd_op_queue") == "mclock_scheduler") { std::string max_capacity_iops_config; - bool force_run_benchmark = false; + bool force_run_benchmark = + cct->_conf.get_val("osd_mclock_force_run_benchmark_on_init"); if (store_is_rotational) { max_capacity_iops_config = "osd_mclock_max_capacity_iops_hdd";