﻿# CephFS metadata pressure can be a capability-recall problem

A directory scan can acquire capabilities faster than MDS recall releases them. Diagnose session behavior and trimming before treating the cache target as a hard limit.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/cephfs-mds-cap-recall-pressure/
Language: en

## A scan that outgrows the metadata service

A dataset inventory walks a large directory tree while training clients continue opening files. MDS memory rises and the cluster reports that a client is failing to respond to cache pressure. Increasing the cache target might postpone the symptom without explaining why metadata remains pinned.

The [MDS cache reference](https://docs.ceph.com/en/tentacle/cephfs/cache-configuration/) describes a distributed cache coordinated through capabilities and directory-entry leases. The server cannot simply drop metadata that clients still reference. The relevant question is whether acquisition, recall and release remain balanced for the actual client workload.

## Understand the retained state

Capabilities allow clients to cache state and perform certain mutations coherently. When the MDS needs room, it recalls client state so entries can become eligible for trimming. The configured cache target is not a hard admission barrier: allowing new metadata lookups helps avoid deadlock involving held capabilities.

Distinguish a client with many useful active capabilities from one acquiring metadata faster than it releases it. A recursive scan can generate the latter pattern even when data throughput is low. Bytes read from object storage therefore do not measure this pressure adequately.

## Inspect sessions before adjusting knobs

Identify the clients, their mount implementations, active workload phases and capability counts over a common interval. Correlate recall warnings with acquisition and release activity rather than treating every warning as a permanently unresponsive client. Preserve the effective per-session and global throttles.

The reference documents both recall throttling and acquisition throttling for directory reads. These controls protect the MDS from excessive work. Changing them without checking the direction of the bottleneck can exchange cache growth for a flood of release processing or excessive directory-walk delay.

## Separate recall from eviction

Recall is part of ordinary coherent caching. [Client eviction](https://docs.ceph.com/en/tentacle/cephfs/eviction/) forcibly terminates access and can lose unflushed buffered data. It is not a stronger cache-trimming operation that can be used interchangeably when a memory graph looks uncomfortable.

First bound or pause the inventory workload in a controlled exercise and observe whether the acquisition imbalance subsides. Keep training file-open behavior visible. This distinguishes pressure generated by scanning from a broader client, network or metadata-server problem without assuming that killing a client is harmless.

## Acceptance for a metadata-heavy workload

Accept the workload shape when metadata operations continue completing, cache pressure remains manageable and recalled state is released at a sustainable rate. Include the inventory's completion time as well as training-client errors and latency; improving one by indefinitely starving the other is not a successful result.

[Storage placement fundamentals](/journal/storage-optimized-hosting/) explain the separation between metadata and bulk data work. [Snapshot consistency](/journal/guide-storage-filesystem-snapshot/) adds the distinct requirement that a successful inventory does not establish an application-consistent saved state.

## Limits of the diagnosis

This procedure does not establish a universal cache size or a safe recall rate. Those depend on client behavior and the deployed release. Nor does a disappearing warning prove every client healthy. Preserve session-level evidence and the workload boundary so the conclusion remains specific: the identified metadata acquisition and release imbalance was corrected without substituting destructive eviction for ordinary recall.
