From 5cdd29f78bdd19185d3d93479a57be25fa98d7f1 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Mon, 29 May 2023 17:11:37 +0300 Subject: [PATCH] os/bluestore: do not include single AU allocations to allocation fragmentation stats. The rationale is that such allocations always get single framgent. Signed-off-by: Igor Fedotov --- src/os/bluestore/BlueStore.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 7795fc7b6dc94..b5fda972c0db9 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -17763,9 +17763,11 @@ void BlueStore::_log_alerts(osd_alert_list_t& alerts) void BlueStore::_collect_allocation_stats(uint64_t need, uint32_t alloc_size, const PExtentVector& extents) { - alloc_stats_count++; - alloc_stats_fragments += extents.size(); - alloc_stats_size += need; + if (alloc_size != min_alloc_size) { + alloc_stats_count++; + alloc_stats_fragments += extents.size(); + alloc_stats_size += need; + } for (auto& e : extents) { logger->hinc(l_bluestore_allocate_hist, e.length, need); -- 2.39.5