From: Sage Weil Date: Tue, 15 Sep 2015 20:41:03 +0000 (-0400) Subject: osd: limit nubmer of pg stat updates in flight X-Git-Tag: v10.0.1~26^2~56 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c131c81511ca766f96238b1942e8fad566bd7413;p=ceph.git osd: limit nubmer of pg stat updates in flight 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 --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index cf8235de5bbf..ca0ce5883390 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -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 diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f194628f7ea4..1c6d903fe6bc 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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;