From: Sage Weil Date: Mon, 29 Apr 2019 21:17:40 +0000 (-0500) Subject: mgr/DaemonServer: allow pgp_num increases to be fast if pool is empty(ish) X-Git-Tag: v14.2.2~173^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=06eeadea9a717b05d14916eb2fd9fcb019ca898c;p=ceph.git mgr/DaemonServer: allow pgp_num increases to be fast if pool is empty(ish) If we just created a new pool and it's basically empty, there is no reason to throttle the pgp_num changes. Signed-off-by: Sage Weil (cherry picked from commit c7c2d18da5058ffbe1f71e66a8d4c1dcfd8eacdb) --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 1a248eebf33..b733668ccbd 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -2584,7 +2584,12 @@ 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 =