]> 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>
Wed, 2 Jun 2021 08:49:48 +0000 (14:19 +0530)
commitdb6c995ba6ea7d19642955acf8d117d3267e9632
tree7de3c9aea82f69ef41822f4ff23190cee34523cf
parent6ad38a291dd1fffb5a8b9ad786dd7ca22f67f411
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>
src/osd/OSD.cc
src/osd/OSD.h
src/osd/scheduler/OpScheduler.h
src/osd/scheduler/mClockScheduler.cc
src/osd/scheduler/mClockScheduler.h