Todd Lipcon has submitted this change and it was merged.

Change subject: Add trace metrics for maintenance ops, LBM writes
......................................................................


Add trace metrics for maintenance ops, LBM writes

This adds a trace-scoped counter for LogBlockManager writes, and also
adds traces and counter printing to the maintenance manager.

With this patch, flushes and compactions now output log messages like:

I0830 13:42:28.809852  2208 maintenance_manager.cc:356] Time spent running 
FlushMRSOp(4301e24175a2469fba37184430567acc): real 9.510s user 4.432s     sys 
0.860s
I0830 13:42:28.810760  2208 maintenance_manager.cc:362] 
FlushMRSOp(4301e24175a2469fba37184430567acc) metrics: 
{"cfile_init":14,"compiler_manager_pool.queue_time_us":106,"compiler_manager_pool.run_cpu_time_us":219218,"compiler_manager_pool.run_wall_time_us":232004,"fdatasync":533,"fdatasync_us":67137,"lbm
 root 0.queue_time_us":1605,"lbm root 0.run_cpu_time_us":1280,"lbm root 
0.run_wall_time_us":344957,"lbm_read_time_us":94,"lbm_reads_lt_1ms":56,"lbm_write_time_us":709833,"lbm_writes_gt_100_ms":1,"lbm_writes_lt_1ms":11564,"mutex_wait_us":343945,"tcmalloc_contention_cycles":2759552,"thread_start_us":1304,"threads_started":13}

This can be handy for understanding why a particular compaction or flush
was slow.

Change-Id: I39cd9438071aabbd2d7bdeca3269af8b83f2d55b
Reviewed-on: http://gerrit.cloudera.org:8080/4172
Tested-by: Kudu Jenkins
Reviewed-by: Dan Burkert <d...@cloudera.com>
---
M src/kudu/fs/log_block_manager.cc
M src/kudu/util/maintenance_manager.cc
M src/kudu/util/trace.h
3 files changed, 30 insertions(+), 10 deletions(-)

Approvals:
  Dan Burkert: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/4172
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I39cd9438071aabbd2d7bdeca3269af8b83f2d55b
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to