mirror of
https://github.com/ceph/ceph
synced 2025-01-01 08:32:24 +00:00
Merge pull request #48192 from amathuria/amathuria-edit-pg-deletion-cost
osd: Change default value of osd_pg_delete_cost Reviewed-by: Sridhar Seshasayee <sseshasa@redhat.com>
This commit is contained in:
commit
9f40fccd78
@ -3945,6 +3945,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();
|
||||
|
||||
@ -9732,6 +9733,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);
|
||||
@ -10044,6 +10048,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.
|
||||
|
@ -1995,6 +1995,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