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: v15.1.0~2784^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c7c2d18da5058ffbe1f71e66a8d4c1dcfd8eacdb;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 --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index bd3e1c624fe7..a12c093fcb90 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -2558,7 +2558,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 =