From a7b4ccba9145012265874983559af676413fd0d2 Mon Sep 17 00:00:00 2001 From: Aishwarya Mathuria Date: Fri, 12 Mar 2021 16:57:40 +0530 Subject: [PATCH] mon: Modifying trim logic to change paxos_service_trim_max dynamically Currently, the Paxos Service trim logic is bounded by a max value (paxos_service_trim_max). This change dynamically modifies the max value when the number of logs to be trimmed is higher than paxos_service_trim_max. The paxos_service_trim_max_multiplier has been added in case we want to increase paxos_service_trim_max by a certain factor. If this option is enabled we get a new upper bound when trim sizes are high. Fixes: https://tracker.ceph.com/issues/50004 Signed-off-by: Aishwarya Mathuria (cherry picked from commit 2e1141e43980a0a44b18159860ebf9cc38316435) Conflicts: doc/rados/configuration/mon-config-ref.rst - trivial resolution --- doc/rados/configuration/mon-config-ref.rst | 8 ++++++ src/common/options.cc | 11 ++++++-- src/mon/PaxosService.cc | 29 +++++++++++++++------- 3 files changed, 37 insertions(+), 11 deletions(-) diff --git a/doc/rados/configuration/mon-config-ref.rst b/doc/rados/configuration/mon-config-ref.rst index e93cd28b7d78..3ea208c63d4c 100644 --- a/doc/rados/configuration/mon-config-ref.rst +++ b/doc/rados/configuration/mon-config-ref.rst @@ -766,6 +766,14 @@ Trimming requires that the placement groups are ``active + clean``. :Default: ``500`` +``paxos service trim max multiplier`` + +:Description: The factor by which paxos service trim max will be multiplied + to get a new upper bound when trim sizes are high (0 disables it) +:Type: Integer +:Default: ``20`` + + ``mon mds force trim to`` :Description: Force monitor to trim mdsmaps to this point (0 disables it. diff --git a/src/common/options.cc b/src/common/options.cc index 372b3d1b0845..a57756bec20f 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -2181,16 +2181,23 @@ std::vector