From: yuval Lifshitz Date: Tue, 31 May 2022 15:40:30 +0000 (+0300) Subject: objecter: add op latency stat and in-flight count X-Git-Tag: v18.0.0~741^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c6a263892ecc24dc09765a385730c31cb5b7ea5;p=ceph-ci.git objecter: add op latency stat and in-flight count this is done in order to better estimate the origin of the end-to-end operation latency. and see how much of it is due to the objecter and how much of it is due to the client that uses it (e.g. the RGW) Signed-off-by: yuval Lifshitz --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 708c12cc9e6..4fe1b3a41c3 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -109,6 +109,8 @@ enum { l_osdc_op_send_bytes, l_osdc_op_resend, l_osdc_op_reply, + l_osdc_op_latency, + l_osdc_op_inflight, l_osdc_oplen_avg, l_osdc_op, @@ -261,6 +263,8 @@ void Objecter::init() pcb.add_u64_counter(l_osdc_op_send_bytes, "op_send_bytes", "Sent data", NULL, 0, unit_t(UNIT_BYTES)); pcb.add_u64_counter(l_osdc_op_resend, "op_resend", "Resent operations"); pcb.add_u64_counter(l_osdc_op_reply, "op_reply", "Operation reply"); + pcb.add_time_avg(l_osdc_op_latency, "op_latency", "Operation latency"); + pcb.add_u64(l_osdc_op_inflight, "op_inflight", "Operations in flight"); pcb.add_u64_avg(l_osdc_oplen_avg, "oplen_avg", "Average length of operation vector"); pcb.add_u64_counter(l_osdc_op, "op", "Operations"); @@ -3562,6 +3566,8 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m) op->onfinish = nullptr; } logger->inc(l_osdc_op_reply); + logger->tinc(l_osdc_op_latency, ceph::coarse_mono_time::clock::now() - op->stamp); + logger->set(l_osdc_op_inflight, num_in_flight); /* get it before we call _finish_op() */ auto completion_lock = s->get_lock(op->target.base_oid);