]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: limit nubmer of pg stat updates in flight
authorSage Weil <sage@redhat.com>
Tue, 15 Sep 2015 20:41:03 +0000 (16:41 -0400)
committerSage Weil <sage@redhat.com>
Sat, 14 Nov 2015 03:42:42 +0000 (22:42 -0500)
There is no reason to heavily pipeline this.  If the mon is slow
committing them we should go slow too.

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

index cf8235de5bbfbaa74119be3c53c136523045894a..ca0ce58833901d775a0028c542398d86a6da493c 100644 (file)
@@ -658,6 +658,7 @@ 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_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
 OPTION(osd_mon_ack_timeout, OPT_INT, 30) // time out a mon if it doesn't ack stats
 OPTION(osd_stats_ack_timeout_factor, OPT_DOUBLE, 2.0) // multiples of mon_ack_timeout
index f194628f7ea40ccf435322445be7a404193765f1..1c6d903fe6bc5be8a6683ed7ace5e6dc137e38e1 100644 (file)
@@ -4005,6 +4005,9 @@ void OSD::tick()
     if (now - last_pg_stats_sent > cct->_conf->osd_mon_report_interval_max) {
       osd_stat_updated = true;
       report = true;
+    } else if (outstanding_pg_stats >= cct->_conf->osd_mon_report_max_in_flight) {
+      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;