From 2c63330748c75f218fa36d8aba6a289a27cba893 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 24 Jan 2019 14:23:08 -0800 Subject: [PATCH] mds: limit maximum number of caps held by session This is to prevent unsustainable situations where a client has so many outstanding caps that a linear traversal/operation on the session's caps takes unacceptable amounts of time. Fixes: http://tracker.ceph.com/issues/38022 Signed-off-by: Patrick Donnelly (cherry picked from commit 48ca097) Conflicts: PendingReleaseNotes src/mds/Server.cc --- PendingReleaseNotes | 6 ++++++ src/common/options.cc | 4 ++++ src/mds/MDSRank.cc | 1 + src/mds/Server.cc | 16 +++++++++++++--- src/mds/Server.h | 1 + 5 files changed, 25 insertions(+), 3 deletions(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 75338bdae1f03..142ac77d659fb 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -9,6 +9,12 @@ to not attempt recalling too many caps at once, leading to instability. MDS with a large cache (64GB+) should be more stable. +* MDS now provides a config option "mds_max_caps_per_client" (default: 1M) to + limit the number of caps a client session may hold. Long running client + sessions with a large number of caps have been a source of instability in the + MDS when all of these caps need to be processed during certain session + events. It is recommended to not unnecessarily increase this value. + * The `cache drop` admin socket command has been removed. The `ceph tell mds.X cache drop` remains. diff --git a/src/common/options.cc b/src/common/options.cc index ca0a0ebcaf8ee..5a8ec3484aeb2 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -7179,6 +7179,10 @@ std::vector