]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: cap adjusted max mon report interval at 2/3 of timeout
authorSage Weil <sage@redhat.com>
Fri, 2 Oct 2015 13:06:29 +0000 (09:06 -0400)
committerSage Weil <sage@redhat.com>
Mon, 23 Nov 2015 13:38:47 +0000 (08:38 -0500)
This ensures that we don't throttle back mon reports so much that
the mon times out out due to no pg stat reports.  Since there is
little value is having a lower max anyway, just set this at an
upper bound (relative to the mon's timeout value).

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

index ca0ce58833901d775a0028c542398d86a6da493c..f5ea116940c53ea3954e6a6de7e89e77d8a15d73 100644 (file)
@@ -656,7 +656,7 @@ OPTION(osd_pg_max_concurrent_snap_trims, OPT_U64, 2)
 OPTION(osd_heartbeat_min_healthy_ratio, OPT_FLOAT, .33)
 
 OPTION(osd_mon_heartbeat_interval, OPT_INT, 30)  // (seconds) how often to ping monitor if no peers
-OPTION(osd_mon_report_interval_max, OPT_INT, 120)
+OPTION(osd_mon_report_interval_max, OPT_INT, 600)
 OPTION(osd_mon_report_interval_min, OPT_INT, 5)  // pg stats, failures, up_thru, boot.
 OPTION(osd_mon_report_max_in_flight, OPT_INT, 2)  // max updates in flight
 OPTION(osd_pg_stat_report_interval_max, OPT_INT, 500)  // report pg stats for any given pg at least this often
index 7f538c1ac1a217dab07e39186423d6b8b81d00ca..85fee628da327203d94b923f35b79de257b8b068 100644 (file)
@@ -4065,7 +4065,10 @@ void OSD::tick_without_osd_lock()
     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;
+    // note: we shouldn't adjust max because it must remain < the
+    // mon's mon_osd_report_timeout (which defaults to 1.5x our
+    // value).
+    double max = cct->_conf->osd_mon_report_interval_max;
     if (!outstanding_pg_stats.empty() &&
        (now - stats_ack_timeout) > last_pg_stats_ack) {
       dout(1) << __func__ << " mon hasn't acked PGStats in "
@@ -4079,7 +4082,7 @@ void OSD::tick_without_osd_lock()
            stats_ack_timeout * g_conf->osd_stats_ack_timeout_factor);
       outstanding_pg_stats.clear();
     }
-    if (now - last_pg_stats_sent > adjusted_max) {
+    if (now - last_pg_stats_sent > max) {
       osd_stat_updated = true;
       report = true;
     } else if ((int)outstanding_pg_stats.size() >=