From: Patrick Donnelly Date: Mon, 28 Jan 2019 23:48:38 +0000 (-0800) Subject: mds: simplify recall warnings X-Git-Tag: v13.2.7~24^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=063b795d3b80d39d97ad37a1ad97e30bf7b6f22c;p=ceph.git mds: simplify recall warnings Instead of a timeout and complicated decisions about whether the client is releasing caps in an expeditious fashion, just use a DecayCounter that tracks the number of caps we've recalled. This counter is decremented whenever the client releases caps. If the counter passes a threshold, then we raise the warning. Similar reworking is done for the steady-state recall of client caps. Another release DecayCounter is added so we can tell when the client is not releasing any more caps. Signed-off-by: Patrick Donnelly (cherry picked from commit c0b3a11) Conflicts: PendingReleaseNotes src/mds/Beacon.cc src/mds/Server.cc src/mds/SessionMap.cc src/mds/SessionMap.h --- diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 142ac77d659fb..1a8bb18f6a5c9 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -15,6 +15,12 @@ MDS when all of these caps need to be processed during certain session events. It is recommended to not unnecessarily increase this value. +* The MDS config mds_recall_state_timeout has been removed. Late client recall + warnings are now generated based on the number of caps the MDS has recalled + which have not been released. The new configs mds_recall_warning_threshold + (default: 32K) and mds_recall_warning_decay_rate (default: 60s) sets the + threshold for this warning. + * The `cache drop` admin socket command has been removed. The `ceph tell mds.X cache drop` remains. diff --git a/qa/tasks/cephfs/test_client_limits.py b/qa/tasks/cephfs/test_client_limits.py index 1dfa752be7afc..faae19efea5bc 100644 --- a/qa/tasks/cephfs/test_client_limits.py +++ b/qa/tasks/cephfs/test_client_limits.py @@ -42,10 +42,13 @@ class TestClientLimits(CephFSTestCase): cache_size = open_files/2 self.set_conf('mds', 'mds cache size', cache_size) + self.set_conf('mds', 'mds_recall_max_caps', open_files/2) + self.set_conf('mds', 'mds_recall_warning_threshold', open_files) self.fs.mds_fail_restart() self.fs.wait_for_daemons() mds_min_caps_per_client = int(self.fs.get_config("mds_min_caps_per_client")) + mds_recall_warning_decay_rate = self.fs.get_config("mds_recall_warning_decay_rate") self.assertTrue(open_files >= mds_min_caps_per_client) mount_a_client_id = self.mount_a.get_global_id() @@ -63,13 +66,11 @@ class TestClientLimits(CephFSTestCase): # MDS should not be happy about that, as the client is failing to comply # with the SESSION_RECALL messages it is being sent - mds_recall_state_timeout = float(self.fs.get_config("mds_recall_state_timeout")) - self.wait_for_health("MDS_CLIENT_RECALL", mds_recall_state_timeout+10) + self.wait_for_health("MDS_CLIENT_RECALL", mds_recall_warning_decay_rate*2) # We can also test that the MDS health warning for oversized # cache is functioning as intended. - self.wait_for_health("MDS_CACHE_OVERSIZED", - mds_recall_state_timeout + 10) + self.wait_for_health("MDS_CACHE_OVERSIZED", mds_recall_warning_decay_rate*2) # When the client closes the files, it should retain only as many caps as allowed # under the SESSION_RECALL policy diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 70be6ef6132f3..5645c9eb23268 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -415,7 +415,6 @@ OPTION(mds_session_blacklist_on_timeout, OPT_BOOL) // whether to blacklist cl OPTION(mds_session_blacklist_on_evict, OPT_BOOL) // whether to blacklist clients whose sessions are dropped via admin commands OPTION(mds_sessionmap_keys_per_op, OPT_U32) // how many sessions should I try to load/store in a single OMAP operation? -OPTION(mds_recall_state_timeout, OPT_FLOAT) // detect clients which aren't trimming caps OPTION(mds_freeze_tree_timeout, OPT_FLOAT) // detecting freeze tree deadlock OPTION(mds_health_summarize_threshold, OPT_INT) // collapse N-client health metrics to a single 'many' OPTION(mds_reconnect_timeout, OPT_FLOAT) // seconds to wait for clients during mds restart diff --git a/src/common/options.cc b/src/common/options.cc index 5a8ec3484aeb2..a813c2150e53d 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -6797,9 +6797,13 @@ std::vector