]> git.apps.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>
Fri, 10 Nov 2023 09:57:30 +0000 (15:27 +0530)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 59dd587ddb3bc95a95d0fb8715511d194181ec6f)

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

index 7d994a653a684ff5e300fbb1d4070f9e7b7cebb8..76678c624aab1d78a2ae8faf86be7ad5c738f4d8 100644 (file)
@@ -69,6 +69,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);
@@ -477,6 +479,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)
@@ -924,6 +927,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 c1c28a8455badc9886daa3f136a488a73cb911f0..360dd66a27bb5c24dc3696822d01381450cbf1c8 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,
 };