mirror of
https://github.com/ceph/ceph
synced 2025-04-09 11:12:50 +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
|
// max_misplaced, to somewhat limit the magnitude of
|
||||||
// our potential error here.
|
// our potential error here.
|
||||||
int next;
|
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;
|
next = target;
|
||||||
} else {
|
} else {
|
||||||
double room =
|
double room =
|
||||||
std::min<double>(max_misplaced - misplaced_ratio,
|
std::min<double>(max_misplaced - misplaced_ratio,
|
||||||
misplaced_ratio / 2.0);
|
max_misplaced / 2.0);
|
||||||
unsigned estmax = std::max<unsigned>(
|
unsigned estmax = std::max<unsigned>(
|
||||||
(double)p.get_pg_num() * room, 1u);
|
(double)p.get_pg_num() * room, 1u);
|
||||||
int delta = target - p.get_pgp_num();
|
int delta = target - p.get_pgp_num();
|
||||||
@ -2575,7 +2580,8 @@ void DaemonServer::adjust_pgs()
|
|||||||
}
|
}
|
||||||
dout(20) << " room " << room << " estmax " << estmax
|
dout(20) << " room " << room << " estmax " << estmax
|
||||||
<< " delta " << delta << " next " << next << dendl;
|
<< " 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
|
// since pgp_num is tracking pg_num, ceph is handling
|
||||||
// pgp_num. so, be responsible: don't let pgp_num get
|
// pgp_num. so, be responsible: don't let pgp_num get
|
||||||
// too far out ahead of merges (if we are merging).
|
// too far out ahead of merges (if we are merging).
|
||||||
|
Loading…
Reference in New Issue
Block a user