]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: throttle cap acquisition via readdir
authorKotresh HR <khiremat@redhat.com>
Wed, 7 Oct 2020 11:33:48 +0000 (17:03 +0530)
committerKotresh HR <khiremat@redhat.com>
Thu, 22 Oct 2020 13:26:43 +0000 (18:56 +0530)
commitc0de657d3f99f8a3a0d89576dff2f8e98f5f8974
tree873d2843bb922b12f04f3bfd0cb375e216cef11c
parent2437ef8648261953d3bacadcb81ec03f341b66ec
mds: throttle cap acquisition via readdir

A trivial "find" command on a large directory hierarchy will cause the
client to receive caps significantly faster than it will release. The
MDS will try to have the client reduce its caps below the
mds_max_caps_per_client limit but the recall throttles prevent it from
catching up to the pace of acquisition. The solution is to throttle
readdir from client. This patch does the same.

The readdir is throttled on the condition that the number of caps
acquired is greater than certain percentage of mds_max_caps_per_client
(default is 10%) and cap acquisition via readdir is certain percentage
of mds_max_caps_per_client (the default is 50%). When the above
condition is met, the readdir request is retried after
'mds_cap_acquisition_throttle_retry_request_timeout' (default is 0.5)
seconds.

Fixes: https://tracker.ceph.com/issues/47307
Signed-off-by: Kotresh HR <khiremat@redhat.com>
qa/tasks/cephfs/cephfs_test_case.py
qa/tasks/cephfs/test_client_limits.py
src/common/options.cc
src/mds/MDSRank.cc
src/mds/Server.cc
src/mds/Server.h
src/mds/SessionMap.cc
src/mds/SessionMap.h