mirror of
https://github.com/ceph/ceph
synced 2025-02-24 03:27:10 +00:00
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 <ylifshit@redhat.com>
This commit is contained in:
parent
9324b49ebb
commit
2c6a263892
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user