]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Add missing tracked mclock config options and do some clean-up. 41004/head
authorSridhar Seshasayee <sseshasa@redhat.com>
Thu, 22 Apr 2021 11:40:38 +0000 (17:10 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Tue, 27 Apr 2021 05:41:58 +0000 (11:11 +0530)
Add the missing tracked mclock config options related to the background
best effort clients of mclock scheduler within handle_conf_change().

The method mClockScheduler::set_global_recovery_options() doesn't serve
the purpose fully as in addition to overriding the "osd_max_backfills"
config option, the local and remote Async reserver objects have to be
updated accordingly which is not possible currently from within the
mClockScheduler. Therefore, rather than complicate the mClockScheduler
code to achieve this, a better option is to override the recovery options
during OSD init (and handle config changes) which the previous commit
introduced.  Therefore, this method is removed.

Fixes: https://tracker.ceph.com/issues/50501
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
src/osd/scheduler/mClockScheduler.cc
src/osd/scheduler/mClockScheduler.h

index 080dec541c0c536cbb2b74856e7ec066acac9283..470c943f4dfa2a19f19da410e77972e1f11766c3 100644 (file)
@@ -334,8 +334,6 @@ void mClockScheduler::enable_mclock_profile_settings()
 
   // Set the mclock config parameters
   set_profile_config();
-  // Set recovery specific Ceph options
-  set_global_recovery_options();
 }
 
 void mClockScheduler::set_profile_config()
@@ -372,39 +370,6 @@ void mClockScheduler::set_profile_config()
     std::to_string(best_effort.lim));
 }
 
-void mClockScheduler::set_global_recovery_options()
-{
-  // Set high value for recovery max active and max backfill
-  int rec_max_active = 1000;
-  int max_backfills = 1000;
-  cct->_conf.set_val("osd_recovery_max_active", std::to_string(rec_max_active));
-  cct->_conf.set_val("osd_max_backfills", std::to_string(max_backfills));
-
-  // Disable recovery sleep
-  cct->_conf.set_val("osd_recovery_sleep", std::to_string(0));
-  cct->_conf.set_val("osd_recovery_sleep_hdd", std::to_string(0));
-  cct->_conf.set_val("osd_recovery_sleep_ssd", std::to_string(0));
-  cct->_conf.set_val("osd_recovery_sleep_hybrid", std::to_string(0));
-
-  // Disable delete sleep
-  cct->_conf.set_val("osd_delete_sleep", std::to_string(0));
-  cct->_conf.set_val("osd_delete_sleep_hdd", std::to_string(0));
-  cct->_conf.set_val("osd_delete_sleep_ssd", std::to_string(0));
-  cct->_conf.set_val("osd_delete_sleep_hybrid", std::to_string(0));
-
-  // Disable snap trim sleep
-  cct->_conf.set_val("osd_snap_trim_sleep", std::to_string(0));
-  cct->_conf.set_val("osd_snap_trim_sleep_hdd", std::to_string(0));
-  cct->_conf.set_val("osd_snap_trim_sleep_ssd", std::to_string(0));
-  cct->_conf.set_val("osd_snap_trim_sleep_hybrid", std::to_string(0));
-
-  // Disable scrub sleep
-  cct->_conf.set_val("osd_scrub_sleep", std::to_string(0));
-
-  // Apply the changes
-  cct->_conf.apply_changes(nullptr);
-}
-
 int mClockScheduler::calc_scaled_cost(int item_cost)
 {
   // Calculate total scaled cost in secs
@@ -526,7 +491,10 @@ void mClockScheduler::handle_conf_change(
       changed.count("osd_mclock_scheduler_client_lim") ||
       changed.count("osd_mclock_scheduler_background_recovery_res") ||
       changed.count("osd_mclock_scheduler_background_recovery_wgt") ||
-      changed.count("osd_mclock_scheduler_background_recovery_lim")) {
+      changed.count("osd_mclock_scheduler_background_recovery_lim") ||
+      changed.count("osd_mclock_scheduler_background_best_effort_res") ||
+      changed.count("osd_mclock_scheduler_background_best_effort_wgt") ||
+      changed.count("osd_mclock_scheduler_background_best_effort_lim")) {
     if (mclock_profile == "custom") {
       client_registry.update_from_config(conf);
     }
index 2e513bb6ce3009eaf998e1614909e399eecbaa94..faee092f665d2bccf59dad4a9476e530c752d901 100644 (file)
@@ -169,9 +169,6 @@ public:
   // Set mclock config parameter based on allocations
   void set_profile_config();
 
-  // Set recovery specific Ceph settings for profiles
-  void set_global_recovery_options();
-
   // Calculate scale cost per item
   int calc_scaled_cost(int cost);