]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: backoff the max reporting interval, too
authorSage Weil <sage@redhat.com>
Thu, 17 Sep 2015 21:47:54 +0000 (17:47 -0400)
committerSage Weil <sage@redhat.com>
Mon, 23 Nov 2015 13:36:14 +0000 (08:36 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index 9e40a159fa17a173955b5ed249972529dddb2243..5186f70498e23fcd33c998977682b0439d6f0157 100644 (file)
@@ -3989,6 +3989,9 @@ void OSD::tick()
     bool report = false;
     utime_t now = ceph_clock_now(cct);
     pg_stat_queue_lock.Lock();
+    double backoff = stats_ack_timeout / g_conf->osd_mon_ack_timeout;
+    double adjusted_min = cct->_conf->osd_mon_report_interval_min * backoff;
+    double adjusted_max = cct->_conf->osd_mon_report_interval_max * backoff;
     if (!outstanding_pg_stats.empty() &&
        (now - stats_ack_timeout) > last_pg_stats_ack) {
       dout(1) << __func__ << " mon hasn't acked PGStats in "
@@ -4002,7 +4005,7 @@ void OSD::tick()
            stats_ack_timeout * g_conf->osd_stats_ack_timeout_factor);
       outstanding_pg_stats.clear();
     }
-    if (now - last_pg_stats_sent > cct->_conf->osd_mon_report_interval_max) {
+    if (now - last_pg_stats_sent > adjusted_max) {
       osd_stat_updated = true;
       report = true;
     } else if ((int)outstanding_pg_stats.size() >=
@@ -4010,8 +4013,6 @@ void OSD::tick()
       dout(20) << __func__ << " have max " << outstanding_pg_stats
               << " stats updates in flight" << dendl;
     } else {
-      double backoff = stats_ack_timeout / g_conf->osd_mon_ack_timeout;
-      double adjusted_min = cct->_conf->osd_mon_report_interval_min * backoff;
       if (now - last_mon_report > adjusted_min) {
        dout(20) << __func__ << " stats backoff " << backoff
                 << " adjusted_min " << adjusted_min << " - sending report"