]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: Run osd bench test to override default max osd capacity for mclock
authorSridhar Seshasayee <sseshasa@redhat.com>
Mon, 10 May 2021 09:11:54 +0000 (14:41 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Tue, 3 Aug 2021 05:54:36 +0000 (11:24 +0530)
commitcf876406d876ad35d9adc985814a22be908db42c
tree40f90321d6beaade9da75704e41811659670e771
parente36fb7f3c8f85f1c751adcba196d97d407581e39
osd: Run osd bench test to override default max osd capacity for mclock

If mclock scheduler is enabled, run the osd bench test as part of osd
initialization sequence in order to determine the max osd capacity. The
iops determined as part of the test is used to override the default
osd_mclock_max_capacity_iops_[hdd,ssd] option depending on the
underlying device type.

The test performs random writes of 100 objects of 4MiB size using
4KiB blocksize. The existing test which was a part of asok_command() is
factored out into a separate method called run_osd_bench_test() so that it
can be used for both purposes. If the test fails, the default values
for the above mentioned options are used.

A new method called update_configuration() in introduced in OpScheduler
base class to facilitate propagation of changes to a config option
that is not user initiated. This method helps in applying changes and
update any internal variable associated with a config option as
long as it is tracked. In this case, the change to the max osd capacity
is propagated to each op shard using the mentioned method. In the
future this method can be useful to propagate changes to advanced
config option(s) that the user is not expected to modify.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
(cherry picked from commit db6c995ba6ea7d19642955acf8d117d3267e9632)

Conflicts:
    src/osd/OSD.cc
- Retained use of cmd_getval() since cmd_getval_or() is not available
  for parsing the 'osd bench' command options.
src/osd/OSD.cc
src/osd/OSD.h
src/osd/scheduler/OpScheduler.h
src/osd/scheduler/mClockScheduler.cc
src/osd/scheduler/mClockScheduler.h