mirror of
https://github.com/ceph/ceph
synced 2025-01-04 02:02:36 +00:00
osd: Change default value of osd_pg_delete_cost
osd_pg_delete_cost defines the cost of the PG deletion operation. This cost is used by WPQ to determine which operation should be dequeued. Lower the cost, higher the chance of the operation being dequeued next. mClock scheduler uses the cost parameter in a similar way. However, with the osd_delete_sleep_ssd and osd_delete_sleep_hdd options disabled with mClock, we noticed that PG deletion was completing much faster with mClock scheduler. In order to achieve behavior similar to WPQ with mClock scheduler, the osd_pg_delete_cost has been increased. Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
This commit is contained in:
parent
728e8ac088
commit
41eb65785d
@ -3886,6 +3886,7 @@ int OSD::init()
|
||||
|
||||
// Override a few options if mclock scheduler is enabled.
|
||||
maybe_override_sleep_options_for_qos();
|
||||
maybe_override_cost_for_qos();
|
||||
maybe_override_options_for_qos();
|
||||
maybe_override_max_osd_capacity_for_qos();
|
||||
|
||||
@ -9670,6 +9671,9 @@ void OSD::handle_conf_change(const ConfigProxy& conf,
|
||||
changed.count("osd_recovery_sleep_hybrid")) {
|
||||
maybe_override_sleep_options_for_qos();
|
||||
}
|
||||
if (changed.count("osd_pg_delete_cost")) {
|
||||
maybe_override_cost_for_qos();
|
||||
}
|
||||
if (changed.count("osd_min_recovery_priority")) {
|
||||
service.local_reserver.set_min_priority(cct->_conf->osd_min_recovery_priority);
|
||||
service.remote_reserver.set_min_priority(cct->_conf->osd_min_recovery_priority);
|
||||
@ -9982,6 +9986,17 @@ void OSD::maybe_override_sleep_options_for_qos()
|
||||
}
|
||||
}
|
||||
|
||||
void OSD::maybe_override_cost_for_qos()
|
||||
{
|
||||
// If the scheduler enabled is mclock, override the default PG deletion cost
|
||||
// so that mclock can meet the QoS goals.
|
||||
if (cct->_conf.get_val<std::string>("osd_op_queue") == "mclock_scheduler" &&
|
||||
!unsupported_objstore_for_qos()) {
|
||||
uint64_t pg_delete_cost = 15728640;
|
||||
cct->_conf.set_val("osd_pg_delete_cost", std::to_string(pg_delete_cost));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A context for receiving status from a background mon command to set
|
||||
* a config option and optionally apply the changes on each op shard.
|
||||
|
@ -2024,6 +2024,7 @@ private:
|
||||
void maybe_override_sleep_options_for_qos();
|
||||
bool maybe_override_options_for_qos(
|
||||
const std::set<std::string> *changed = nullptr);
|
||||
void maybe_override_cost_for_qos();
|
||||
int run_osd_bench_test(int64_t count,
|
||||
int64_t bsize,
|
||||
int64_t osize,
|
||||
|
Loading…
Reference in New Issue
Block a user