]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: scale mon report interval with timeout backoff
authorSage Weil <sage@redhat.com>
Tue, 15 Sep 2015 20:26:54 +0000 (16:26 -0400)
committerSage Weil <sage@redhat.com>
Sat, 14 Nov 2015 03:42:42 +0000 (22:42 -0500)
If we have had to scale the backoff by 3x because the mon is
loaded, scale the min report interval accordingly.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index 677c1cd6570d0e7483dbf35c69c316a843d38d68..e1b4a90e4e7e759522304ad3b9c16bd38a97a98a 100644 (file)
@@ -4003,8 +4003,15 @@ void OSD::tick()
     if (now - last_pg_stats_sent > cct->_conf->osd_mon_report_interval_max) {
       osd_stat_updated = true;
       do_mon_report();
-    } else if (now - last_mon_report > cct->_conf->osd_mon_report_interval_min) {
-      do_mon_report();
+    } 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"
+                << dendl;
+       do_mon_report();
+      }
     }
 
     map_lock.put_read();