]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: support limiting cache by memory
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 11 Sep 2017 22:21:52 +0000 (15:21 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 13 Sep 2017 03:02:41 +0000 (20:02 -0700)
commit06c94de584e6cd7d347bcdfb79d9fef4fed0d277
treed2cfbbcb0cbc46d32dac3b78bcee9f6937aa6117
parent12d615b3c546211b48ee75921f0e06371dd62dae
mds: support limiting cache by memory

This introduces two config parameters:

    mds_cache_memory_limit: Sets the soft maximum of the cache to the given
    byte count. (Like mds_cache_size, this doesn't actually limit the maximum
    size of the cache. It just dictates the steady-state size.)

    mds_cache_reservation: This replaces mds_health_cache_threshold everywhere
    except the Beacon heartbeat sent to the mons. The idea here is to specify a
    reservation of memory (5% by default) for operations and the MDS tries to
    always maintain that reservation. So, the MDS will recall caps from clients
    when it begins dipping into its reservation of memory.

mds_cache_size still limits the cache by Inode count but is now by-default 0
(i.e. unlimited). The new preferred way of specifying cache limits is by memory
size. The default is 1GB.

Fixes: http://tracker.ceph.com/issues/20594
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1464976
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
14 files changed:
PendingReleaseNotes
doc/cephfs/health-messages.rst
doc/cephfs/mds-config-ref.rst
qa/suites/fs/basic_functional/tasks/client-limits.yaml
qa/tasks/cephfs/test_client_limits.py
src/common/legacy_config_opts.h
src/common/options.cc
src/mds/Beacon.cc
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/MDLog.cc
src/mds/Migrator.cc
src/mds/Server.cc
src/mds/Server.h