Skip to content

Commit

Permalink
osd: Add config option to skip running the OSD benchmark on start-up.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sseshasa committed Sep 1, 2021
1 parent db226b9 commit 6ca32bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/common/options/osd.yaml.in
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/osd/OSD.cc
Expand Up @@ -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");
Expand Down

0 comments on commit 6ca32bd

Please sign in to comment.