Skip to content

Commit

Permalink
Merge pull request ceph#7109 from Aran85/wip-mon-laggy-interval
Browse files Browse the repository at this point in the history
mon/OSDMonitor: osdmap laggy set a maximum limit for interval

Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Jan 13, 2016
2 parents ed82212 + f11ad56 commit c374173
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/common/config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ OPTION(mon_subscribe_interval, OPT_DOUBLE, 24*3600) // for legacy clients only
OPTION(mon_delta_reset_interval, OPT_DOUBLE, 10) // seconds of inactivity before we reset the pg delta to 0
OPTION(mon_osd_laggy_halflife, OPT_INT, 60*60) // (seconds) how quickly our laggy estimations decay
OPTION(mon_osd_laggy_weight, OPT_DOUBLE, .3) // weight for new 'samples's in laggy estimations
OPTION(mon_osd_laggy_max_interval, OPT_INT, 300) // maximum value of laggy_interval in laggy estimations
OPTION(mon_osd_adjust_heartbeat_grace, OPT_BOOL, true) // true if we should scale based on laggy estimations
OPTION(mon_osd_adjust_down_out_interval, OPT_BOOL, true) // true if we should scale based on laggy estimations
OPTION(mon_osd_auto_mark_in, OPT_BOOL, false) // mark any booting osds 'in'
Expand Down
7 changes: 5 additions & 2 deletions src/mon/OSDMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2067,8 +2067,11 @@ bool OSDMonitor::prepare_boot(MonOpRequestRef op)
dout(10) << " not laggy, new xi " << xi << dendl;
} else {
if (xi.down_stamp.sec()) {
int interval = ceph_clock_now(g_ceph_context).sec() - xi.down_stamp.sec();
xi.laggy_interval =
int interval = ceph_clock_now(g_ceph_context).sec() - xi.down_stamp.sec();
if (g_conf->mon_osd_laggy_max_interval && (interval > g_conf->mon_osd_laggy_max_interval)) {
interval = g_conf->mon_osd_laggy_max_interval;
}
xi.laggy_interval =
interval * g_conf->mon_osd_laggy_weight +
xi.laggy_interval * (1.0 - g_conf->mon_osd_laggy_weight);
}
Expand Down

0 comments on commit c374173

Please sign in to comment.