]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Remove the generic "osd_mclock_max_capacity_iops" option.
authorSridhar Seshasayee <sseshasa@redhat.com>
Fri, 14 May 2021 08:24:19 +0000 (13:54 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Tue, 3 Aug 2021 05:54:24 +0000 (11:24 +0530)
Remove the generic "osd_mclock_max_capacity_iops" option and use the
"osd_mclock_max_capacity_iops_[hdd,ssd]" options. It is better to have a
clear indication about the type of underlying device. This helps in
avoiding confusion when trying to read or override the options.

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

Conflicts:
    src/common/options/osd.yaml.in
- Removed non-existent file: src/common/options/osd.yaml.in since the
  switch to yaml for config options is not available in pacific yet.
- Removed config option "osd_mclock_max_capacity_iops" from options.cc.

src/common/options.cc
src/osd/scheduler/mClockScheduler.cc

index 96bbf56c1a023a29dce44669c819ed82856c0ccb..a53c15c12512cd769a80b1662a30fe5767de14b8 100644 (file)
@@ -3118,12 +3118,6 @@ std::vector<Option> get_global_options() {
     .set_long_description("This option specifies the cost per byte to consider in microseconds per OSD for solid state device type. This is considered by the mclock_scheduler to set an additional cost factor in QoS calculations. Only considered for osd_op_queue = mclock_scheduler")
     .set_flag(Option::FLAG_RUNTIME),
 
-    Option("osd_mclock_max_capacity_iops", Option::TYPE_FLOAT, Option::LEVEL_BASIC)
-    .set_default(0.0)
-    .set_description("Max IOPs capacity (at 4KiB block size) to consider per OSD (overrides _ssd and _hdd if non-zero)")
-    .set_long_description("This option specifies the max osd capacity in iops per OSD. Helps in QoS calculations when enabling a dmclock profile. Only considered for osd_op_queue = mclock_scheduler")
-    .set_flag(Option::FLAG_RUNTIME),
-
     Option("osd_mclock_max_capacity_iops_hdd", Option::TYPE_FLOAT, Option::LEVEL_BASIC)
     .set_default(315.0)
     .set_description("Max IOPs capacity (at 4KiB block size) to consider per OSD (for rotational media)")
index 470c943f4dfa2a19f19da410e77972e1f11766c3..e34c4094e0ca13fd52edaecd8caf168b7dc6c1fd 100644 (file)
@@ -99,17 +99,12 @@ const dmc::ClientInfo *mClockScheduler::ClientRegistry::get_info(
 
 void mClockScheduler::set_max_osd_capacity()
 {
-  if (cct->_conf.get_val<double>("osd_mclock_max_capacity_iops")) {
+  if (is_rotational) {
     max_osd_capacity =
-      cct->_conf.get_val<double>("osd_mclock_max_capacity_iops");
+      cct->_conf.get_val<double>("osd_mclock_max_capacity_iops_hdd");
   } else {
-    if (is_rotational) {
-      max_osd_capacity =
-        cct->_conf.get_val<double>("osd_mclock_max_capacity_iops_hdd");
-    } else {
-      max_osd_capacity =
-        cct->_conf.get_val<double>("osd_mclock_max_capacity_iops_ssd");
-    }
+    max_osd_capacity =
+      cct->_conf.get_val<double>("osd_mclock_max_capacity_iops_ssd");
   }
   // Set per op-shard iops limit
   max_osd_capacity /= num_shards;
@@ -447,7 +442,6 @@ const char** mClockScheduler::get_tracked_conf_keys() const
     "osd_mclock_cost_per_byte_usec",
     "osd_mclock_cost_per_byte_usec_hdd",
     "osd_mclock_cost_per_byte_usec_ssd",
-    "osd_mclock_max_capacity_iops",
     "osd_mclock_max_capacity_iops_hdd",
     "osd_mclock_max_capacity_iops_ssd",
     "osd_mclock_profile",
@@ -470,8 +464,7 @@ void mClockScheduler::handle_conf_change(
       changed.count("osd_mclock_cost_per_byte_usec_ssd")) {
     set_osd_mclock_cost_per_byte();
   }
-  if (changed.count("osd_mclock_max_capacity_iops") ||
-      changed.count("osd_mclock_max_capacity_iops_hdd") ||
+  if (changed.count("osd_mclock_max_capacity_iops_hdd") ||
       changed.count("osd_mclock_max_capacity_iops_ssd")) {
     set_max_osd_capacity();
     if (mclock_profile != "custom") {