mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
Merge PR #27875 into master
* refs/pull/27875/head: mgr/DaemonServer: Fix pgp_num throttling min mgr/DaemonServer: allow pgp_num increases to be fast if pool is empty(ish) mgr: fix pgp_num vs merge pacer Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
4933a0475b
@ -2558,12 +2558,17 @@ void DaemonServer::adjust_pgs()
|
||||
// max_misplaced, to somewhat limit the magnitude of
|
||||
// our potential error here.
|
||||
int next;
|
||||
if (aggro) {
|
||||
|
||||
pool_stat_t s = pg_map.get_pg_pool_sum_stat(i.first);
|
||||
if (aggro ||
|
||||
// pool is (virtually) empty; just jump to final pgp_num?
|
||||
(p.get_pgp_num_target() > p.get_pgp_num() &&
|
||||
s.stats.sum.num_objects <= p.get_pgp_num_target())) {
|
||||
next = target;
|
||||
} else {
|
||||
double room =
|
||||
std::min<double>(max_misplaced - misplaced_ratio,
|
||||
misplaced_ratio / 2.0);
|
||||
max_misplaced / 2.0);
|
||||
unsigned estmax = std::max<unsigned>(
|
||||
(double)p.get_pg_num() * room, 1u);
|
||||
int delta = target - p.get_pgp_num();
|
||||
@ -2575,7 +2580,8 @@ void DaemonServer::adjust_pgs()
|
||||
}
|
||||
dout(20) << " room " << room << " estmax " << estmax
|
||||
<< " delta " << delta << " next " << next << dendl;
|
||||
if (p.get_pgp_num_target() == p.get_pg_num_target()) {
|
||||
if (p.get_pgp_num_target() == p.get_pg_num_target() &&
|
||||
p.get_pgp_num_target() < p.get_pg_num()) {
|
||||
// since pgp_num is tracking pg_num, ceph is handling
|
||||
// pgp_num. so, be responsible: don't let pgp_num get
|
||||
// too far out ahead of merges (if we are merging).
|
||||
|
Loading…
Reference in New Issue
Block a user