From 6ca32bde2e1d0dd58df168126582a570ac09aad6 Mon Sep 17 00:00:00 2001 From: Sridhar Seshasayee Date: Tue, 3 Aug 2021 14:03:26 +0530 Subject: [PATCH] osd: Add config option to skip running the OSD benchmark on start-up. 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 --- src/common/options/osd.yaml.in | 13 +++++++++++++ src/osd/OSD.cc | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/common/options/osd.yaml.in b/src/common/options/osd.yaml.in index bf990b70752f6..e5ce3648e921c 100644 --- a/src/common/options/osd.yaml.in +++ b/src/common/options/osd.yaml.in @@ -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 diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index b0518b6b9130b..6c8552f55a1c8 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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("osd_op_queue") == "mclock_scheduler") { + if ((cct->_conf.get_val("osd_op_queue") == "mclock_scheduler") && + (cct->_conf.get_val("osd_mclock_skip_benchmark") == false)) { std::string max_capacity_iops_config; bool force_run_benchmark = cct->_conf.get_val("osd_mclock_force_run_benchmark_on_init");