]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/epm: add retried_blocked_io metrics
authorMatan Breizman <mbreizma@redhat.com>
Thu, 18 Sep 2025 13:35:54 +0000 (13:35 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 18 Sep 2025 13:46:44 +0000 (13:46 +0000)
We only track once an IO was blocked in the first time. Track
also the number of retries on this IO.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/os/seastore/extent_placement_manager.cc
src/crimson/os/seastore/extent_placement_manager.h

index 74d95c01bb69a72c3ec865d29cb13f0ab7f8f0fb..275d8c4dd7ce2352fa1b1737cb432a82fa57a2dd 100644 (file)
@@ -723,6 +723,12 @@ ExtentPlacementManager::BackgroundProcess::reserve_projected_usage(
               res.cleaner_result.reserve_cold_success,
               usage);
         abort_io_usage(usage, res);
+        if (!res.reserve_inline_success) {
+          ++stats.io_retried_blocked_count_trim;
+        }
+          if (!res.cleaner_result.is_successful()) {
+          ++stats.io_retried_blocked_count_clean;
+        }
         blocking_io = seastar::promise<>();
       }
     } while (blocking_io);
@@ -981,6 +987,10 @@ void ExtentPlacementManager::BackgroundProcess::register_metrics()
                      sm::description("IOs that are blocked by gc")),
     sm::make_counter("io_blocked_count_trim", stats.io_blocked_count_trim,
                      sm::description("IOs that are blocked by trimming")),
+    sm::make_counter("io_retried_blocked_count_clean", stats.io_blocked_count_clean,
+                     sm::description("Retried IOs that are blocked by cleaning")),
+    sm::make_counter("io_retried_blocked_count_trim", stats.io_blocked_count_trim,
+                     sm::description("Retried IOs that are blocked by trimming")),
     sm::make_counter("io_blocked_count_clean", stats.io_blocked_count_clean,
                      sm::description("IOs that are blocked by cleaning")),
     sm::make_counter("io_blocked_sum", stats.io_blocked_sum,
index 95378d558e62bc5b5566177785774356345f0286..994edc85829f35ea4f0bf12006d0a2b3c0613f18 100644 (file)
@@ -1075,6 +1075,8 @@ private:
       uint64_t io_blocked_count = 0;
       uint64_t io_blocked_count_trim = 0;
       uint64_t io_blocked_count_clean = 0;
+      uint64_t io_retried_blocked_count_trim = 0;
+      uint64_t io_retried_blocked_count_clean = 0;
       uint64_t io_blocked_sum = 0;
       uint64_t io_blocked_time = 0;
     } stats;