From 8a33d9c1dd5574da10ced345c5aab8cbe53d6961 Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Thu, 27 Feb 2020 00:01:49 +0300 Subject: [PATCH] os/bluestore: log allocation stats on a daily basis. The primary goal is to be able to track allocator fragmentation trend. Which might help in troubleshooting performance changes caused by aging. Tracks history for up to last 31 days by keeping a set of 5 historic probes selected from power of two sequence. I.e. Dey -1 Day -2 Day -4 Day -8 Day -16 Signed-off-by: Igor Fedotov --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 4 ++ src/os/bluestore/BlueStore.cc | 67 +++++++++++++++++++++++++++++++++ src/os/bluestore/BlueStore.h | 11 ++++++ 4 files changed, 83 insertions(+) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 7aff6bedcad..fbe387230bf 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -1000,6 +1000,7 @@ OPTION(bluestore_cache_size_hdd, OPT_U64) OPTION(bluestore_cache_size_ssd, OPT_U64) OPTION(bluestore_cache_meta_ratio, OPT_DOUBLE) OPTION(bluestore_cache_kv_ratio, OPT_DOUBLE) +OPTION(bluestore_alloc_stats_dump_interval, OPT_DOUBLE) OPTION(bluestore_kvbackend, OPT_STR) OPTION(bluestore_allocator, OPT_STR) // stupid | bitmap OPTION(bluestore_freelist_blocks_per_key, OPT_INT) diff --git a/src/common/options.cc b/src/common/options.cc index 4442e97ba82..0883e04cd60 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -4355,6 +4355,10 @@ std::vector