]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add perf counter to track number of sessions evicted due to metadata threshold...
authorVenky Shankar <vshankar@redhat.com>
Mon, 21 Aug 2023 07:50:22 +0000 (03:50 -0400)
committerVenky Shankar <vshankar@redhat.com>
Mon, 9 Oct 2023 13:14:57 +0000 (18:44 +0530)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 59dd587ddb3bc95a95d0fb8715511d194181ec6f)

src/mds/SessionMap.cc
src/mds/SessionMap.h

index 41b35cdb0732ff9311e2267decc54f231624d662..720396338ca703a8264f2a60d0dae74217263aea 100644 (file)
@@ -71,6 +71,8 @@ void SessionMap::register_perfcounters()
   plb.add_u64(l_mdssm_avg_load, "average_load", "Average Load");
   plb.add_u64(l_mdssm_avg_session_uptime, "avg_session_uptime",
                "Average session uptime");
+  plb.add_u64(l_mdssm_metadata_threshold_sessions_evicted, "mdthresh_evicted",
+             "Sessions evicted on reaching metadata threshold");
 
   logger = plb.create_perf_counters();
   g_ceph_context->get_perfcounters_collection()->add(logger);
@@ -479,6 +481,7 @@ void SessionMap::save(MDSContext *onsave, version_t needv)
                        new C_OnFinisher(new C_IO_SM_Save(this, version),
                                         mds->finisher));
   apply_blocklist(to_blocklist);
+  logger->inc(l_mdssm_metadata_threshold_sessions_evicted, to_blocklist.size());
 }
 
 void SessionMap::_save_finish(version_t v)
@@ -923,6 +926,7 @@ void SessionMap::save_if_dirty(const std::set<entity_name_t> &tgt_sessions,
   }
 
   apply_blocklist(to_blocklist);
+  logger->inc(l_mdssm_metadata_threshold_sessions_evicted, to_blocklist.size());
 }
 
 // =================
index 426a9ac9354fea84ad1a85d1b995b68dff0977f2..ddf227be9d1155f27f35c999536d32ce871cb634 100644 (file)
@@ -45,6 +45,7 @@ enum {
   l_mdssm_total_load,
   l_mdssm_avg_load,
   l_mdssm_avg_session_uptime,
+  l_mdssm_metadata_threshold_sessions_evicted,
   l_mdssm_last,
 };