]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/transaction_manager: drop the extent metrics
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 24 Jan 2022 03:52:44 +0000 (11:52 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Tue, 25 Jan 2022 03:24:21 +0000 (11:24 +0800)
These metrics won't distinguish extent operations from invalidated and
successful transactions.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/transaction_manager.cc
src/crimson/os/seastore/transaction_manager.h

index 15c6672b5b422a790cb6c217b587ce1f755924f7..e6f25941ebb79bbaf7cac94032a163f637f3ab2c 100644 (file)
@@ -37,7 +37,6 @@ TransactionManager::TransactionManager(
 {
   segment_cleaner->set_extent_callback(this);
   journal->set_write_pipeline(&write_pipeline);
-  register_metrics();
 }
 
 TransactionManager::mkfs_ertr::future<> TransactionManager::mkfs()
@@ -189,8 +188,6 @@ TransactionManager::ref_ret TransactionManager::dec_ref(
        t,
        *ref);
       cache->retire_extent(t, ref);
-      stats.extents_retired_total++;
-      stats.extents_retired_bytes += ref->get_length();
     }
     return ret.refcount;
   });
@@ -207,9 +204,7 @@ TransactionManager::ref_ret TransactionManager::dec_ref(
       DEBUGT("offset {} refcount 0", t, offset);
       return cache->retire_extent_addr(
        t, result.addr, result.length
-      ).si_then([result, this] {
-       stats.extents_retired_total++;
-       stats.extents_retired_bytes += result.length;
+      ).si_then([] {
        return ref_ret(
          interruptible::ready_future_marker{},
          0);
@@ -491,23 +486,4 @@ TransactionManager::get_extent_if_live_ret TransactionManager::get_extent_if_liv
 
 TransactionManager::~TransactionManager() {}
 
-void TransactionManager::register_metrics()
-{
-  namespace sm = seastar::metrics;
-  metrics.add_group("tm", {
-    sm::make_counter("extents_retired_total", stats.extents_retired_total,
-                    sm::description("total number of retired extents in TransactionManager")),
-    sm::make_counter("extents_retired_bytes", stats.extents_retired_bytes,
-                    sm::description("total size of retired extents in TransactionManager")),
-    sm::make_counter("extents_mutated_total", stats.extents_mutated_total,
-                    sm::description("total number of mutated extents in TransactionManager")),
-    sm::make_counter("extents_mutated_bytes", stats.extents_mutated_bytes,
-                    sm::description("total size of mutated extents in TransactionManager")),
-    sm::make_counter("extents_allocated_total", stats.extents_allocated_total,
-                    sm::description("total number of allocated extents in TransactionManager")),
-    sm::make_counter("extents_allocated_bytes", stats.extents_allocated_bytes,
-                    sm::description("total size of allocated extents in TransactionManager")),
-  });
-}
-
 }
index 82d08ea40b69e9f3c3fa6b3ad9cb73de2bde8928..cc3683993130c164870c86fb357045b3c461e6b4 100644 (file)
@@ -228,8 +228,6 @@ public:
     auto ret = cache->duplicate_for_write(
       t,
       ref)->cast<LogicalCachedExtent>();
-    stats.extents_mutated_total++;
-    stats.extents_mutated_bytes += ret->get_length();
     if (!ret->has_pin()) {
       SUBDEBUGT(seastore_tm,
        "duplicating {} for write: {}",
@@ -308,11 +306,9 @@ public:
       laddr_hint,
       len,
       ext->get_paddr()
-    ).si_then([ext=std::move(ext), len, laddr_hint, &t, this](auto &&ref) mutable {
+    ).si_then([ext=std::move(ext), laddr_hint, &t](auto &&ref) mutable {
       LOG_PREFIX(TransactionManager::alloc_extent);
       ext->set_pin(std::move(ref));
-      stats.extents_allocated_total++;
-      stats.extents_allocated_bytes += len;
       SUBDEBUGT(seastore_tm, "new extent: {}, laddr_hint: {}", t, *ext, laddr_hint);
       return alloc_extent_iertr::make_ready_future<TCachedExtentRef<T>>(
        std::move(ext));
@@ -548,17 +544,6 @@ private:
 
   WritePipeline write_pipeline;
 
-  struct {
-    uint64_t extents_retired_total = 0;
-    uint64_t extents_retired_bytes = 0;
-    uint64_t extents_mutated_total = 0;
-    uint64_t extents_mutated_bytes = 0;
-    uint64_t extents_allocated_total = 0;
-    uint64_t extents_allocated_bytes = 0;
-  } stats;
-  seastar::metrics::metric_group metrics;
-  void register_metrics();
-
   rewrite_extent_ret rewrite_logical_extent(
     Transaction& t,
     LogicalCachedExtentRef extent);