diff options
author | Samuel Just <sam.just@inktank.com> | 2013-08-05 13:25:37 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-08-06 13:51:51 -0700 |
commit | 321f57de97c00c44077f7007eeae20b033a38c3d (patch) | |
tree | 4b59a1cfba496b17aa7c197f46156ac5e74572d2 | |
parent | 0017010735c0bf883251a72d84c32399aee8192c (diff) | |
download | ceph-321f57de97c00c44077f7007eeae20b033a38c3d.tar.gz |
OpRequest: don't warn as quickly for slow recovery ops
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/common/config_opts.h | 8 | ||||
-rw-r--r-- | src/osd/OpRequest.cc | 16 | ||||
-rw-r--r-- | src/osd/OpRequest.h | 12 |
3 files changed, 23 insertions, 13 deletions
diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 1c7a917602a..f2afefc92e2 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 a6cdc9ecffb..c694362a8a5 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 a2014472432..e72f03d1d77 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); |