]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/DaemonServer: prevent pgp_num reductions from outpacing pg_num merges 27547/head
authorSage Weil <sage@redhat.com>
Tue, 9 Apr 2019 22:12:37 +0000 (17:12 -0500)
committerNathan Cutler <ncutler@suse.com>
Fri, 12 Apr 2019 12:08:50 +0000 (14:08 +0200)
commitf39d8079dd24f6f2287591b59f05b57170500d76
tree795ad2a0ad91046c354bb34733fd0d09b7f7658c
parenta5f853800c23317121878b4c718cbde419b92aea
mgr/DaemonServer: prevent pgp_num reductions from outpacing pg_num merges

If we are merging lots of pgs down to a much smaller number of pgs, and
the pgs are able to move quickly (faster than the merges happen), we can
end up with too many pgs on a small number of osds, triggering the max
pgs per osd limits.

Avoid this by preventing the pgp_num reductions from getting too far
out in front of the merges themselves.  Basically, cap the delta between
pgp_num and pg_num to the max_misplaced ratio.  We are already limiting
the movement caused by pgp_num by max_misplaced; this effectively just
makes sure that the actual merging (and pg_num reductions) are keeping
up.

Fixes: http://tracker.ceph.com/issues/38786
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 76503a1438fa1f166d2c230c73ca8d7b67e6468d)
src/mgr/DaemonServer.cc