From: Samuel Just Date: Mon, 5 Aug 2013 20:25:37 +0000 (-0700) Subject: OpRequest: don't warn as quickly for slow recovery ops X-Git-Tag: v0.67~19^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=321f57de97c00c44077f7007eeae20b033a38c3d;p=ceph.git OpRequest: don't warn as quickly for slow recovery ops Signed-off-by: Samuel Just --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 1c7a917602a0..f2afefc92e20 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -489,9 +489,13 @@ OPTION(osd_leveldb_log, OPT_STR, "") // enable OSD leveldb log file * osd_client_op_priority/osd_recovery_op_priority determines the ratio of * available io between client and recovery. Each option may be set between * 1..63. + * + * osd_recovery_op_warn_multiple scales the normal warning threshhold, + * osd_op_complaint_time, so that slow recovery ops won't cause noise */ -OPTION(osd_client_op_priority, OPT_INT, 63) -OPTION(osd_recovery_op_priority, OPT_INT, 10) +OPTION(osd_client_op_priority, OPT_U32, 63) +OPTION(osd_recovery_op_priority, OPT_U32, 10) +OPTION(osd_recovery_op_warn_multiple, OPT_U32, 16) // Max time to wait between notifying mon of shutdown and shutting down OPTION(osd_mon_shutdown_timeout, OPT_DOUBLE, 5) diff --git a/src/osd/OpRequest.cc b/src/osd/OpRequest.cc index a6cdc9ecffb5..c694362a8a5b 100644 --- a/src/osd/OpRequest.cc +++ b/src/osd/OpRequest.cc @@ -20,6 +20,22 @@ static ostream& _prefix(std::ostream* _dout) return *_dout << "--OSD::tracker-- "; } +OpRequest::OpRequest(Message *req, OpTracker *tracker) : + request(req), xitem(this), + rmw_flags(0), + warn_interval_multiplier(1), + lock("OpRequest::lock"), + tracker(tracker), + hit_flag_points(0), latest_flag_point(0), + seq(0) { + received_time = request->get_recv_stamp(); + tracker->register_inflight_op(&xitem); + if (req->get_priority() < g_conf->osd_client_op_priority) { + // don't warn as quickly for low priority ops + warn_interval_multiplier = g_conf->osd_recovery_op_warn_multiple; + } +} + void OpHistory::on_shutdown() { arrived.clear(); diff --git a/src/osd/OpRequest.h b/src/osd/OpRequest.h index a2014472432d..e72f03d1d778 100644 --- a/src/osd/OpRequest.h +++ b/src/osd/OpRequest.h @@ -156,17 +156,7 @@ private: static const uint8_t flag_sub_op_sent = 1 << 4; static const uint8_t flag_commit_sent = 1 << 5; - OpRequest(Message *req, OpTracker *tracker) : - request(req), xitem(this), - rmw_flags(0), - warn_interval_multiplier(1), - lock("OpRequest::lock"), - tracker(tracker), - hit_flag_points(0), latest_flag_point(0), - seq(0) { - received_time = request->get_recv_stamp(); - tracker->register_inflight_op(&xitem); - } + OpRequest(Message *req, OpTracker *tracker); public: ~OpRequest() { assert(request);