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:
Yuri Weinstein 2023-02-27 11:54:33 -08:00 committed by GitHub
commit 9f40fccd78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -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.

View File

@ -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,