From: Mingxin Liu Date: Wed, 22 Mar 2017 09:07:37 +0000 (+0800) Subject: mon: quick start if no update in a long period X-Git-Tag: v12.1.0~10^2~5^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F14176%2Fhead;p=ceph.git mon: quick start if no update in a long period Signed-off-by: Mingxin Liu --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 8b4a1010ab26..b0a0523c600d 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -1514,7 +1514,11 @@ void PGMap::update_delta(CephContext *cct, delta_t -= *last_ts; // take the last timestamp we saw *last_ts = ts; // @p ts becomes the last timestamp we saw - // calculate a delta, and average over the last 2 deltas. + // adjust delta_t, quick start if there is no update in a long period + delta_t = std::min(delta_t, + utime_t(2 * (cct ? cct->_conf->mon_delta_reset_interval : 10), 0)); + + // calculate a delta, and average over the last 6 deltas by default. /* start by taking a copy of our current @p result_pool_sum, and by * taking out the stats from @p old_pool_sum. This generates a stats * delta. Stash this stats delta in @p delta_avg_list, along with the