]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: improve reweight_by_utilization() logic 8733/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 26 Apr 2016 03:13:32 +0000 (11:13 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 26 Apr 2016 05:33:44 +0000 (13:33 +0800)
commite7a32534ebc9e27f955ff2d7a8d1db511383301e
treef418d839d7c46ff6f6dc48d04524d8311098b767
parent3557903d5d57642179b2ae137bedc389974b1956
mon/OSDMonitor: improve reweight_by_utilization() logic

By calling reweight_by_utilization() method, we are aiming at an evener result
of utilization among all osds. To achieve this, we shall decrease weights of
osds which are currently overloaded, and try to increase weights of osds which
are currently underloaded when it is possible.
However, we can't do this all at a time in order to avoid a massive pg migrations
between osds. Thus we introduce a max_osds limit to smooth the progress.

The problem here is that we have sorted the utilization of all osds in a descending
manner and we always try to decrease the weights of the most overloaded osds
since they are most likely to encounter a nearfull/full transition soon, but
we won't increase the weights from the most underloaded(least utilized by contrast)
at the same time, which I think is not quite reasonable.

Actually, the best thing would probably be to iterate over teh low and high osds
in parallel, and do the ones that are furthest from the average first.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/OSDMonitor.cc