From c6272752e78f366e0fe1744c74d541d6bdb105ee Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Fri, 11 Nov 2022 17:31:19 +0300 Subject: [PATCH] os/bluestore: introduce a cooldown period for failed BlueFS allocations. When using bluefs_shared_alloc_size one might get a long-lasting state when that large chunks are not available any more and fallback to shared device min alloc size occurs. The introduced cooldown is intended to prevent repetitive allocation attempts with bluefs_shared_alloc_size for a while. The rationale is to eliminate performance penalty these failing attempts might cause. Signed-off-by: Igor Fedotov (cherry picked from commit e52bcc852ce51ab99138420f9069e2f59e1cb706) Conflicts: src/common/options/global.yaml.in (legacy options declarations, no yamls in pacific) --- src/common/legacy_config_opts.h | 1 + src/common/options.cc | 12 ++++++++++ src/os/bluestore/BlueFS.cc | 42 ++++++++++++++++++++++++++++----- src/os/bluestore/BlueFS.h | 1 + 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index ea103d7de9eb..27bd36f3c2aa 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -906,6 +906,7 @@ OPTION(objectstore_blackhole, OPT_BOOL) OPTION(bluefs_alloc_size, OPT_U64) OPTION(bluefs_shared_alloc_size, OPT_U64) +OPTION(bluefs_failed_shared_alloc_cooldown, OPT_DOUBLE) OPTION(bluefs_max_prefetch, OPT_U64) OPTION(bluefs_min_log_runway, OPT_U64) // alloc when we get this low OPTION(bluefs_max_log_runway, OPT_U64) // alloc this much at a time diff --git a/src/common/options.cc b/src/common/options.cc index 4dc69cb0db3a..b6f18e30b218 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -4278,6 +4278,18 @@ std::vector