diff options
author | Venky Shankar <vshankar@redhat.com> | 2018-06-22 07:43:37 +0200 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2018-08-16 08:16:50 +0200 |
commit | 48a33f6f06802fee998f60a2ec35d9041a7c51a6 (patch) | |
tree | c1efe632d5557c33690cc5ac05bf2c1f4635dc0c /src/mds | |
parent | mds: show session load average in dump session (diff) | |
download | ceph-48a33f6f06802fee998f60a2ec35d9041a7c51a6.tar.xz ceph-48a33f6f06802fee998f60a2ec35d9041a7c51a6.zip |
mds: reorganize and curate perf log counters
Categorize perf counters into high (PRIO_{CRITICAL/INTERESTING}),
medium (PRIO_USEFUL) and low priority (PRIO_DEBUGONLY). High and
medium priority stats are transmitted to ceph mgr and included in
prometheus output.
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Fixes: http://tracker.ceph.com/issues/24004
Diffstat (limited to 'src/mds')
-rw-r--r-- | src/mds/MDCache.cc | 69 | ||||
-rw-r--r-- | src/mds/MDLog.cc | 29 | ||||
-rw-r--r-- | src/mds/MDSRank.cc | 88 | ||||
-rw-r--r-- | src/mds/PurgeQueue.cc | 10 | ||||
-rw-r--r-- | src/mds/Server.cc | 80 | ||||
-rw-r--r-- | src/mds/SessionMap.cc | 3 |
6 files changed, 155 insertions, 124 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index ad3ffcd2bf9..f64496128b2 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -12763,43 +12763,54 @@ void MDCache::flush_dentry_work(MDRequestRef& mdr) */ void MDCache::register_perfcounters() { - PerfCountersBuilder pcb(g_ceph_context, - "mds_cache", l_mdc_first, l_mdc_last); - - /* Stray/purge statistics */ - pcb.add_u64(l_mdc_num_strays, "num_strays", - "Stray dentries", "stry", PerfCountersBuilder::PRIO_INTERESTING); - pcb.add_u64(l_mdc_num_strays_delayed, "num_strays_delayed", "Stray dentries delayed"); - pcb.add_u64(l_mdc_num_strays_enqueuing, "num_strays_enqueuing", "Stray dentries enqueuing for purge"); - - pcb.add_u64_counter(l_mdc_strays_created, "strays_created", "Stray dentries created"); + PerfCountersBuilder pcb(g_ceph_context, "mds_cache", l_mdc_first, l_mdc_last); + + // Stray/purge statistics + pcb.add_u64(l_mdc_num_strays, "num_strays", "Stray dentries", "stry", + PerfCountersBuilder::PRIO_INTERESTING); + pcb.add_u64(l_mdc_num_recovering_enqueued, + "num_recovering_enqueued", "Files waiting for recovery", "recy", + PerfCountersBuilder::PRIO_INTERESTING); + pcb.add_u64_counter(l_mdc_recovery_completed, + "recovery_completed", "File recoveries completed", "recd", + PerfCountersBuilder::PRIO_INTERESTING); + + // useful recovery queue statistics + pcb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL); + pcb.add_u64(l_mdc_num_recovering_processing, "num_recovering_processing", + "Files currently being recovered"); + pcb.add_u64(l_mdc_num_recovering_prioritized, "num_recovering_prioritized", + "Files waiting for recovery with elevated priority"); + pcb.add_u64_counter(l_mdc_recovery_started, "recovery_started", + "File recoveries started"); + + // along with other stray dentries stats + pcb.add_u64(l_mdc_num_strays_delayed, "num_strays_delayed", + "Stray dentries delayed"); + pcb.add_u64(l_mdc_num_strays_enqueuing, "num_strays_enqueuing", + "Stray dentries enqueuing for purge"); + pcb.add_u64_counter(l_mdc_strays_created, "strays_created", + "Stray dentries created"); pcb.add_u64_counter(l_mdc_strays_enqueued, "strays_enqueued", - "Stray dentries enqueued for purge"); - pcb.add_u64_counter(l_mdc_strays_reintegrated, "strays_reintegrated", "Stray dentries reintegrated"); - pcb.add_u64_counter(l_mdc_strays_migrated, "strays_migrated", "Stray dentries migrated"); - - - /* Recovery queue statistics */ - pcb.add_u64(l_mdc_num_recovering_processing, "num_recovering_processing", "Files currently being recovered"); - pcb.add_u64(l_mdc_num_recovering_enqueued, "num_recovering_enqueued", - "Files waiting for recovery", "recy", PerfCountersBuilder::PRIO_INTERESTING); - pcb.add_u64(l_mdc_num_recovering_prioritized, "num_recovering_prioritized", "Files waiting for recovery with elevated priority"); - pcb.add_u64_counter(l_mdc_recovery_started, "recovery_started", "File recoveries started"); - pcb.add_u64_counter(l_mdc_recovery_completed, "recovery_completed", - "File recoveries completed", "recd", PerfCountersBuilder::PRIO_INTERESTING); + "Stray dentries enqueued for purge"); + pcb.add_u64_counter(l_mdc_strays_reintegrated, "strays_reintegrated", + "Stray dentries reintegrated"); + pcb.add_u64_counter(l_mdc_strays_migrated, "strays_migrated", + "Stray dentries migrated"); + // low prio internal request stats pcb.add_u64_counter(l_mdss_ireq_enqueue_scrub, "ireq_enqueue_scrub", - "Internal Request type enqueue scrub"); + "Internal Request type enqueue scrub"); pcb.add_u64_counter(l_mdss_ireq_exportdir, "ireq_exportdir", - "Internal Request type export dir"); + "Internal Request type export dir"); pcb.add_u64_counter(l_mdss_ireq_flush, "ireq_flush", - "Internal Request type flush"); + "Internal Request type flush"); pcb.add_u64_counter(l_mdss_ireq_fragmentdir, "ireq_fragmentdir", - "Internal Request type fragmentdir"); + "Internal Request type fragmentdir"); pcb.add_u64_counter(l_mdss_ireq_fragstats, "ireq_fragstats", - "Internal Request type frag stats"); + "Internal Request type frag stats"); pcb.add_u64_counter(l_mdss_ireq_inodestats, "ireq_inodestats", - "Internal Request type inode stats"); + "Internal Request type inode stats"); logger.reset(pcb.create_perf_counters()); g_ceph_context->get_perfcounters_collection()->add(logger.get()); diff --git a/src/mds/MDLog.cc b/src/mds/MDLog.cc index 9cbb64aa023..ed2694095f1 100644 --- a/src/mds/MDLog.cc +++ b/src/mds/MDLog.cc @@ -52,29 +52,30 @@ void MDLog::create_logger() { PerfCountersBuilder plb(g_ceph_context, "mds_log", l_mdl_first, l_mdl_last); - plb.add_u64_counter(l_mdl_evadd, "evadd", - "Events submitted", "subm", PerfCountersBuilder::PRIO_INTERESTING); - plb.add_u64_counter(l_mdl_evex, "evex", "Total expired events"); - plb.add_u64_counter(l_mdl_evtrm, "evtrm", "Trimmed events"); - plb.add_u64(l_mdl_ev, "ev", - "Events", "evts", PerfCountersBuilder::PRIO_INTERESTING); + plb.add_u64_counter(l_mdl_evadd, "evadd", "Events submitted", "subm", + PerfCountersBuilder::PRIO_INTERESTING); + plb.add_u64(l_mdl_ev, "ev", "Events", "evts", + PerfCountersBuilder::PRIO_INTERESTING); + plb.add_u64(l_mdl_seg, "seg", "Segments", "segs", + PerfCountersBuilder::PRIO_INTERESTING); + + plb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL); plb.add_u64(l_mdl_evexg, "evexg", "Expiring events"); plb.add_u64(l_mdl_evexd, "evexd", "Current expired events"); - + plb.add_u64(l_mdl_segexg, "segexg", "Expiring segments"); + plb.add_u64(l_mdl_segexd, "segexd", "Current expired segments"); + plb.add_u64_counter(l_mdl_replayed, "replayed", "Events replayed"); + plb.add_time_avg(l_mdl_jlat, "jlat", "Journaler flush latency"); + plb.add_u64_counter(l_mdl_evex, "evex", "Total expired events"); + plb.add_u64_counter(l_mdl_evtrm, "evtrm", "Trimmed events"); plb.add_u64_counter(l_mdl_segadd, "segadd", "Segments added"); plb.add_u64_counter(l_mdl_segex, "segex", "Total expired segments"); plb.add_u64_counter(l_mdl_segtrm, "segtrm", "Trimmed segments"); - plb.add_u64(l_mdl_seg, "seg", - "Segments", "segs", PerfCountersBuilder::PRIO_INTERESTING); - plb.add_u64(l_mdl_segexg, "segexg", "Expiring segments"); - plb.add_u64(l_mdl_segexd, "segexd", "Current expired segments"); + plb.set_prio_default(PerfCountersBuilder::PRIO_DEBUGONLY); plb.add_u64(l_mdl_expos, "expos", "Journaler xpire position"); plb.add_u64(l_mdl_wrpos, "wrpos", "Journaler write position"); plb.add_u64(l_mdl_rdpos, "rdpos", "Journaler read position"); - plb.add_time_avg(l_mdl_jlat, "jlat", "Journaler flush latency"); - - plb.add_u64_counter(l_mdl_replayed, "replayed", "Events replayed"); // logger logger = plb.create_perf_counters(); diff --git a/src/mds/MDSRank.cc b/src/mds/MDSRank.cc index ead18339056..a084789f11d 100644 --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@ -2773,66 +2773,65 @@ void MDSRank::create_logger() { PerfCountersBuilder mds_plb(g_ceph_context, "mds", l_mds_first, l_mds_last); - mds_plb.add_u64_counter( - l_mds_request, "request", "Requests", "req", - PerfCountersBuilder::PRIO_CRITICAL); - mds_plb.add_u64_counter(l_mds_reply, "reply", "Replies"); - mds_plb.add_time_avg( - l_mds_reply_latency, "reply_latency", "Reply latency", "rlat", - PerfCountersBuilder::PRIO_CRITICAL); - mds_plb.add_u64_counter( - l_mds_forward, "forward", "Forwarding request", "fwd", - PerfCountersBuilder::PRIO_INTERESTING); + // super useful (high prio) perf stats + mds_plb.add_u64_counter(l_mds_request, "request", "Requests", "req", + PerfCountersBuilder::PRIO_CRITICAL); + mds_plb.add_time_avg(l_mds_reply_latency, "reply_latency", "Reply latency", "rlat", + PerfCountersBuilder::PRIO_CRITICAL); + mds_plb.add_u64(l_mds_inodes, "inodes", "Inodes", "inos", + PerfCountersBuilder::PRIO_CRITICAL); + mds_plb.add_u64_counter(l_mds_forward, "forward", "Forwarding request", "fwd", + PerfCountersBuilder::PRIO_INTERESTING); + mds_plb.add_u64(l_mds_caps, "caps", "Capabilities", "caps", + PerfCountersBuilder::PRIO_INTERESTING); + mds_plb.add_u64_counter(l_mds_exported_inodes, "exported_inodes", "Exported inodes", + "exi", PerfCountersBuilder::PRIO_INTERESTING); + mds_plb.add_u64_counter(l_mds_imported_inodes, "imported_inodes", "Imported inodes", + "imi", PerfCountersBuilder::PRIO_INTERESTING); + + // useful dir/inode/subtree stats + mds_plb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL); mds_plb.add_u64_counter(l_mds_dir_fetch, "dir_fetch", "Directory fetch"); mds_plb.add_u64_counter(l_mds_dir_commit, "dir_commit", "Directory commit"); mds_plb.add_u64_counter(l_mds_dir_split, "dir_split", "Directory split"); mds_plb.add_u64_counter(l_mds_dir_merge, "dir_merge", "Directory merge"); - mds_plb.add_u64(l_mds_inode_max, "inode_max", "Max inodes, cache size"); - mds_plb.add_u64(l_mds_inodes, "inodes", "Inodes", "inos", - PerfCountersBuilder::PRIO_CRITICAL); - mds_plb.add_u64(l_mds_inodes_top, "inodes_top", "Inodes on top"); - mds_plb.add_u64(l_mds_inodes_bottom, "inodes_bottom", "Inodes on bottom"); - mds_plb.add_u64( - l_mds_inodes_pin_tail, "inodes_pin_tail", "Inodes on pin tail"); mds_plb.add_u64(l_mds_inodes_pinned, "inodes_pinned", "Inodes pinned"); mds_plb.add_u64(l_mds_inodes_expired, "inodes_expired", "Inodes expired"); - mds_plb.add_u64( - l_mds_inodes_with_caps, "inodes_with_caps", "Inodes with capabilities"); - mds_plb.add_u64(l_mds_caps, "caps", "Capabilities", "caps", - PerfCountersBuilder::PRIO_INTERESTING); + mds_plb.add_u64(l_mds_inodes_with_caps, "inodes_with_caps", + "Inodes with capabilities"); mds_plb.add_u64(l_mds_subtrees, "subtrees", "Subtrees"); + mds_plb.add_u64(l_mds_load_cent, "load_cent", "Load per cent"); + mds_plb.add_u64_counter(l_mds_openino_dir_fetch, "openino_dir_fetch", + "OpenIno incomplete directory fetchings"); + // low prio stats + mds_plb.set_prio_default(PerfCountersBuilder::PRIO_DEBUGONLY); + mds_plb.add_u64_counter(l_mds_reply, "reply", "Replies"); + mds_plb.add_u64(l_mds_inodes_top, "inodes_top", "Inodes on top"); + mds_plb.add_u64(l_mds_inodes_bottom, "inodes_bottom", "Inodes on bottom"); + mds_plb.add_u64( + l_mds_inodes_pin_tail, "inodes_pin_tail", "Inodes on pin tail"); mds_plb.add_u64_counter(l_mds_traverse, "traverse", "Traverses"); mds_plb.add_u64_counter(l_mds_traverse_hit, "traverse_hit", "Traverse hits"); mds_plb.add_u64_counter(l_mds_traverse_forward, "traverse_forward", - "Traverse forwards"); + "Traverse forwards"); mds_plb.add_u64_counter(l_mds_traverse_discover, "traverse_discover", - "Traverse directory discovers"); + "Traverse directory discovers"); mds_plb.add_u64_counter(l_mds_traverse_dir_fetch, "traverse_dir_fetch", - "Traverse incomplete directory content fetchings"); + "Traverse incomplete directory content fetchings"); mds_plb.add_u64_counter(l_mds_traverse_remote_ino, "traverse_remote_ino", - "Traverse remote dentries"); + "Traverse remote dentries"); mds_plb.add_u64_counter(l_mds_traverse_lock, "traverse_lock", - "Traverse locks"); - - mds_plb.add_u64(l_mds_load_cent, "load_cent", "Load per cent"); + "Traverse locks"); mds_plb.add_u64(l_mds_dispatch_queue_len, "q", "Dispatch queue length"); - mds_plb.add_u64_counter(l_mds_exported, "exported", "Exports"); - mds_plb.add_u64_counter( - l_mds_exported_inodes, "exported_inodes", "Exported inodes", "exi", - PerfCountersBuilder::PRIO_INTERESTING); mds_plb.add_u64_counter(l_mds_imported, "imported", "Imports"); - mds_plb.add_u64_counter( - l_mds_imported_inodes, "imported_inodes", "Imported inodes", "imi", - PerfCountersBuilder::PRIO_INTERESTING); - mds_plb.add_u64_counter(l_mds_openino_dir_fetch, "openino_dir_fetch", - "OpenIno incomplete directory fetchings"); mds_plb.add_u64_counter(l_mds_openino_backtrace_fetch, "openino_backtrace_fetch", - "OpenIno backtrace fetchings"); + "OpenIno backtrace fetchings"); mds_plb.add_u64_counter(l_mds_openino_peer_discover, "openino_peer_discover", - "OpenIno peer inode discovers"); + "OpenIno peer inode discovers"); + logger = mds_plb.create_perf_counters(); g_ceph_context->get_perfcounters_collection()->add(logger); } @@ -2841,21 +2840,26 @@ void MDSRank::create_logger() PerfCountersBuilder mdm_plb(g_ceph_context, "mds_mem", l_mdm_first, l_mdm_last); mdm_plb.add_u64(l_mdm_ino, "ino", "Inodes", "ino", PerfCountersBuilder::PRIO_INTERESTING); + mdm_plb.add_u64(l_mdm_dn, "dn", "Dentries", "dn", + PerfCountersBuilder::PRIO_INTERESTING); + + mdm_plb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL); mdm_plb.add_u64_counter(l_mdm_inoa, "ino+", "Inodes opened"); mdm_plb.add_u64_counter(l_mdm_inos, "ino-", "Inodes closed"); mdm_plb.add_u64(l_mdm_dir, "dir", "Directories"); mdm_plb.add_u64_counter(l_mdm_dira, "dir+", "Directories opened"); mdm_plb.add_u64_counter(l_mdm_dirs, "dir-", "Directories closed"); - mdm_plb.add_u64(l_mdm_dn, "dn", "Dentries", "dn", - PerfCountersBuilder::PRIO_INTERESTING); mdm_plb.add_u64_counter(l_mdm_dna, "dn+", "Dentries opened"); mdm_plb.add_u64_counter(l_mdm_dns, "dn-", "Dentries closed"); mdm_plb.add_u64(l_mdm_cap, "cap", "Capabilities"); mdm_plb.add_u64_counter(l_mdm_capa, "cap+", "Capabilities added"); mdm_plb.add_u64_counter(l_mdm_caps, "cap-", "Capabilities removed"); - mdm_plb.add_u64(l_mdm_rss, "rss", "RSS"); mdm_plb.add_u64(l_mdm_heap, "heap", "Heap size"); mdm_plb.add_u64(l_mdm_buf, "buf", "Buffer size"); + + mdm_plb.set_prio_default(PerfCountersBuilder::PRIO_DEBUGONLY); + mdm_plb.add_u64(l_mdm_rss, "rss", "RSS"); + mlogger = mdm_plb.create_perf_counters(); g_ceph_context->get_perfcounters_collection()->add(mlogger); } diff --git a/src/mds/PurgeQueue.cc b/src/mds/PurgeQueue.cc index c71a5bc5d33..d56f459b286 100644 --- a/src/mds/PurgeQueue.cc +++ b/src/mds/PurgeQueue.cc @@ -97,12 +97,14 @@ PurgeQueue::~PurgeQueue() void PurgeQueue::create_logger() { - PerfCountersBuilder pcb(g_ceph_context, - "purge_queue", l_pq_first, l_pq_last); + PerfCountersBuilder pcb(g_ceph_context, "purge_queue", l_pq_first, l_pq_last); + + pcb.add_u64_counter(l_pq_executed, "pq_executed", "Purge queue tasks executed", + "purg", PerfCountersBuilder::PRIO_INTERESTING); + + pcb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL); pcb.add_u64(l_pq_executing_ops, "pq_executing_ops", "Purge queue ops in flight"); pcb.add_u64(l_pq_executing, "pq_executing", "Purge queue tasks in flight"); - pcb.add_u64_counter(l_pq_executed, "pq_executed", "Purge queue tasks executed", "purg", - PerfCountersBuilder::PRIO_INTERESTING); logger.reset(pcb.create_perf_counters()); g_ceph_context->get_perfcounters_collection()->add(logger.get()); diff --git a/src/mds/Server.cc b/src/mds/Server.cc index dc2c058691e..63bfd4015a6 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -110,70 +110,80 @@ public: void Server::create_logger() { PerfCountersBuilder plb(g_ceph_context, "mds_server", l_mdss_first, l_mdss_last); - plb.add_u64_counter(l_mdss_handle_client_request,"handle_client_request", - "Client requests", "hcr", PerfCountersBuilder::PRIO_INTERESTING); + + plb.add_u64_counter(l_mdss_handle_client_request, "handle_client_request", + "Client requests", "hcr", PerfCountersBuilder::PRIO_INTERESTING); plb.add_u64_counter(l_mdss_handle_slave_request, "handle_slave_request", - "Slave requests", "hsr", PerfCountersBuilder::PRIO_INTERESTING); - plb.add_u64_counter(l_mdss_handle_client_session, "handle_client_session", - "Client session messages", "hcs", PerfCountersBuilder::PRIO_INTERESTING); - plb.add_u64_counter(l_mdss_dispatch_client_request, "dispatch_client_request", "Client requests dispatched"); - plb.add_u64_counter(l_mdss_dispatch_slave_request, "dispatch_server_request", "Server requests dispatched"); + "Slave requests", "hsr", PerfCountersBuilder::PRIO_INTERESTING); + plb.add_u64_counter(l_mdss_handle_client_session, + "handle_client_session", "Client session messages", "hcs", + PerfCountersBuilder::PRIO_INTERESTING); + + // fop latencies are useful + plb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL); plb.add_time_avg(l_mdss_req_lookuphash_latency, "req_lookuphash_latency", - "Request type lookup hash of inode latency"); + "Request type lookup hash of inode latency"); plb.add_time_avg(l_mdss_req_lookupino_latency, "req_lookupino_latency", - "Request type lookup inode latency"); + "Request type lookup inode latency"); plb.add_time_avg(l_mdss_req_lookupparent_latency, "req_lookupparent_latency", - "Request type lookup parent latency"); + "Request type lookup parent latency"); plb.add_time_avg(l_mdss_req_lookupname_latency, "req_lookupname_latency", - "Request type lookup name latency"); + "Request type lookup name latency"); plb.add_time_avg(l_mdss_req_lookup_latency, "req_lookup_latency", - "Request type lookup latency"); + "Request type lookup latency"); plb.add_time_avg(l_mdss_req_lookupsnap_latency, "req_lookupsnap_latency", - "Request type lookup snapshot latency"); + "Request type lookup snapshot latency"); plb.add_time_avg(l_mdss_req_getattr_latency, "req_getattr_latency", - "Request type get attribute latency"); + "Request type get attribute latency"); plb.add_time_avg(l_mdss_req_setattr_latency, "req_setattr_latency", - "Request type set attribute latency"); + "Request type set attribute latency"); plb.add_time_avg(l_mdss_req_setlayout_latency, "req_setlayout_latency", - "Request type set file layout latency"); + "Request type set file layout latency"); plb.add_time_avg(l_mdss_req_setdirlayout_latency, "req_setdirlayout_latency", - "Request type set directory layout latency"); + "Request type set directory layout latency"); plb.add_time_avg(l_mdss_req_setxattr_latency, "req_setxattr_latency", - "Request type set extended attribute latency"); + "Request type set extended attribute latency"); plb.add_time_avg(l_mdss_req_rmxattr_latency, "req_rmxattr_latency", - "Request type remove extended attribute latency"); + "Request type remove extended attribute latency"); plb.add_time_avg(l_mdss_req_readdir_latency, "req_readdir_latency", - "Request type read directory latency"); + "Request type read directory latency"); plb.add_time_avg(l_mdss_req_setfilelock_latency, "req_setfilelock_latency", - "Request type set file lock latency"); + "Request type set file lock latency"); plb.add_time_avg(l_mdss_req_getfilelock_latency, "req_getfilelock_latency", - "Request type get file lock latency"); + "Request type get file lock latency"); plb.add_time_avg(l_mdss_req_create_latency, "req_create_latency", - "Request type create latency"); + "Request type create latency"); plb.add_time_avg(l_mdss_req_open_latency, "req_open_latency", - "Request type open latency"); + "Request type open latency"); plb.add_time_avg(l_mdss_req_mknod_latency, "req_mknod_latency", - "Request type make node latency"); + "Request type make node latency"); plb.add_time_avg(l_mdss_req_link_latency, "req_link_latency", - "Request type link latency"); + "Request type link latency"); plb.add_time_avg(l_mdss_req_unlink_latency, "req_unlink_latency", - "Request type unlink latency"); + "Request type unlink latency"); plb.add_time_avg(l_mdss_req_rmdir_latency, "req_rmdir_latency", - "Request type remove directory latency"); + "Request type remove directory latency"); plb.add_time_avg(l_mdss_req_rename_latency, "req_rename_latency", - "Request type rename latency"); + "Request type rename latency"); plb.add_time_avg(l_mdss_req_mkdir_latency, "req_mkdir_latency", - "Request type make directory latency"); + "Request type make directory latency"); plb.add_time_avg(l_mdss_req_symlink_latency, "req_symlink_latency", - "Request type symbolic link latency"); + "Request type symbolic link latency"); plb.add_time_avg(l_mdss_req_lssnap_latency, "req_lssnap_latency", - "Request type list snapshot latency"); + "Request type list snapshot latency"); plb.add_time_avg(l_mdss_req_mksnap_latency, "req_mksnap_latency", - "Request type make snapshot latency"); + "Request type make snapshot latency"); plb.add_time_avg(l_mdss_req_rmsnap_latency, "req_rmsnap_latency", - "Request type remove snapshot latency"); + "Request type remove snapshot latency"); plb.add_time_avg(l_mdss_req_renamesnap_latency, "req_renamesnap_latency", - "Request type rename snapshot latency"); + "Request type rename snapshot latency"); + + plb.set_prio_default(PerfCountersBuilder::PRIO_DEBUGONLY); + plb.add_u64_counter(l_mdss_dispatch_client_request, "dispatch_client_request", + "Client requests dispatched"); + plb.add_u64_counter(l_mdss_dispatch_slave_request, "dispatch_server_request", + "Server requests dispatched"); + logger = plb.create_perf_counters(); g_ceph_context->get_perfcounters_collection()->add(logger); } diff --git a/src/mds/SessionMap.cc b/src/mds/SessionMap.cc index 50976f0d42f..6651339c899 100644 --- a/src/mds/SessionMap.cc +++ b/src/mds/SessionMap.cc @@ -47,8 +47,11 @@ void SessionMap::register_perfcounters() { PerfCountersBuilder plb(g_ceph_context, "mds_sessions", l_mdssm_first, l_mdssm_last); + plb.add_u64(l_mdssm_session_count, "session_count", "Session count", "sess", PerfCountersBuilder::PRIO_INTERESTING); + + plb.set_prio_default(PerfCountersBuilder::PRIO_USEFUL); plb.add_u64_counter(l_mdssm_session_add, "session_add", "Sessions added"); plb.add_u64_counter(l_mdssm_session_remove, "session_remove", |