From 552dd7fe7ee26e9b80b09211edaf209c9c9d08a5 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 (cherry picked from commit 5cdd29f78bdd19185d3d93479a57be25fa98d7f1) --- 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 d3f98fa6cc379..1f1c81b3362dd 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -17875,9 +17875,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