The most time consuming part of running balancer, or calc_pg_upmaps in particular, that I can think of is

the re-calculation of each pg mapping. For large clusters, that might take seconds even minutes to finish up.

I think a more ideal fix would be introducing a pg mapping cache, e.g., we don't have to re-calculate all pg mappings

if the osdmap epoch does not change, plus some methods to manipulate it the parallel way (https://github.com/ceph/ceph/pull/28373).



原始邮件
发件人:DavidZafman <dzafman@redhat.com>
收件人:谢型果10072465;
抄送人:ceph-devel <dev@ceph.io>;
日 期 :2019年12月05日 06:43
主 题 :upmaps and balancer

Hi Xie,

Pull request https://github.com/ceph/ceph/pull/31774 includes changes to 
the Balancer which I would like you to look at even though it has 
already merged.  During testing I also uncovered an issue which I filed 
tracker https://tracker.ceph.com/issues/43124.  Please have a look at 
the tracker.


Thanks

David