From: Sridhar Seshasayee Date: Thu, 22 Apr 2021 11:40:38 +0000 (+0530) Subject: osd: Add missing tracked mclock config options and do some clean-up. X-Git-Tag: v17.1.0~2106^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=84fe087491397edbaf508a1011115a73ebe1be21;p=ceph.git osd: Add missing tracked mclock config options and do some clean-up. 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 --- diff --git a/src/osd/scheduler/mClockScheduler.cc b/src/osd/scheduler/mClockScheduler.cc index 080dec541c0c..470c943f4dfa 100644 --- a/src/osd/scheduler/mClockScheduler.cc +++ b/src/osd/scheduler/mClockScheduler.cc @@ -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); } diff --git a/src/osd/scheduler/mClockScheduler.h b/src/osd/scheduler/mClockScheduler.h index 2e513bb6ce30..faee092f665d 100644 --- a/src/osd/scheduler/mClockScheduler.h +++ b/src/osd/scheduler/mClockScheduler.h @@ -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);