From 80d767aa53920fb4c197a45a0bf6369437388923 Mon Sep 17 00:00:00 2001 From: Prashant D Date: Fri, 29 Oct 2021 09:09:24 -0400 Subject: [PATCH] osd/OSD: Log aggregated slow ops detail to cluster logs Slow requests can overwhelm a cluster log with every slow op in detail and also fills up the monitor db. Instead, log slow ops details in aggregated format. Fixes: https://tracker.ceph.com/issues/52424 Signed-off-by: Prashant D (cherry picked from commit 9319dc9273b36dc4f4bef1261b3c57690336a8cc) Conflicts: src/common/options/osd.yaml.in - Octopus doesn't have osd.yaml.in; added the option in src/common/options.cc --- src/common/legacy_config_opts.h | 3 ++ src/common/options.cc | 5 ++++ src/osd/OSD.cc | 49 ++++++++++++++++++++++++++++++++- src/osd/OpRequest.h | 29 +++++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 832af68a8ef..b1153638606 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -536,6 +536,9 @@ OPTION(osd_agent_min_evict_effort, OPT_FLOAT) OPTION(osd_agent_quantize_effort, OPT_FLOAT) OPTION(osd_agent_delay_time, OPT_FLOAT) +// Allow OSD daemon to send an aggregated slow ops to the cluster log +OPTION(osd_aggregated_slow_ops_logging, OPT_BOOL) + // osd ignore history.last_epoch_started in find_best_info OPTION(osd_find_best_info_ignore_history_les, OPT_BOOL) diff --git a/src/common/options.cc b/src/common/options.cc index 2397748e791..9467b6fafcb 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2527,6 +2527,11 @@ std::vector