Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hammer: mon: improve reweight_by_utilization() logic #9416

Merged
merged 2 commits into from Jul 29, 2016

Commits on Jul 28, 2016

  1. 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>
    (cherry picked from commit e7a3253)
    
     Conflicts:
    	src/mon/OSDMonitor.cc
    
    Resolved by picking the lambda implemenation.
    NOTE: Because hammer does not support C++11, the lambda functionality from the
    current master has been moved into the "Sorter" function object.
    xiexingguo authored and Jesse Williamson committed Jul 28, 2016
    Configuration menu
    Copy the full SHA
    1b6f6f2 View commit details
    Browse the repository at this point in the history
  2. mon/OSDMonitor: avoid potential expensive grace calculation

    The grace calculation during check_failure() is now very complicated
    and time-consuming. Therefore we shall skip this when it is possible.
    
    Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
    (cherry picked from commit 3557903)
    
     Conflicts:
    	src/mon/OSDMonitor.cc
    
    Resolved by choosing the move-to-top implementation. Removed unused vars.
    xiexingguo authored and Jesse Williamson committed Jul 28, 2016
    Configuration menu
    Copy the full SHA
    23498a9 View commit details
    Browse the repository at this point in the history