CephXL · CephFS ArchitectureCephFS Architecture
CephFS capabilities: the client caching contract
What you'll learn
- Explain what a CephFS capability grants
- Describe capability issue and revocation
- Diagnose problems caused by capability contention
- Handle a client that will not release capabilities
Prerequisites
None — start here.
Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18
Why this matters in production
Capabilities are what make CephFS fast — a client holding the right caps performs local operations with no MDS round trip. They are also the source of the most confusing CephFS problems, where one client’s behaviour makes another client hang.
What a capability grants
Each inode has a capability set issued per client. The bits control what the client may cache and do locally:
| Cap | Grants |
|---|---|
Fs | cache file size and mtime |
Fr | read file data |
Fw | write file data |
Fc | cache file data (read cache) |
Fb | buffer writes (write cache) |
As | cache authentication metadata |
Ax | cache extended attributes |
A client with Fb can buffer writes locally and acknowledge them to the
application before they reach the OSDs, which is a large performance win —
and is only safe because the MDS guarantees no other client holds a
conflicting capability.
ceph daemon mds.a session ls | jq -r '.[] | "\(.id) \(.num_caps) \(.client_metadata.hostname)"'
Issue and revocation
1. client opens a file → MDS issues caps
2. second client opens the same file for writing
3. MDS must revoke the first client's conflicting caps
4. MDS → client 1: release Fb
5. client 1 flushes buffered writes, then releases
6. MDS → client 2: issue write caps
Step 5 is where problems occur. If client 1 is slow to flush — a large buffer, a slow network, an unresponsive host — client 2 waits.
The characteristic symptom
[WRN] MDS_CLIENT_LATE_RELEASE: 1 clients failing to respond to capability release
[WRN] MDS_SLOW_REQUEST: 3 slow requests are blocked
ceph health detail
ceph daemon mds.a dump_blocked_ops
ceph tell mds.a client ls | jq -r '.[] | select(.num_caps > 100000)'
A client holding a very large number of capabilities is often the cause: it has walked a huge directory tree and cached everything, and now every revocation involves searching that set.
Responding
# ask a client to trim its cache
ID=12
SESSION_ID=12
ceph tell mds.a client config set ${ID} ...
# evict a client that will not respond
ceph tell mds.a client evict id=${SESSION_ID}
Eviction blocklists the client, so it cannot write anything further — protecting the filesystem from a client that may be in an unknown state. The client must remount to return.
ADDR=10.20.0.11
ceph osd blocklist ls
ceph osd blocklist rm ${ADDR}
Quiz
Knowledge check · 4 questions
Q1. Client A holds buffered-write capabilities on a file. Client B opens it for writing. What happens?
Q2. Evicting a client that holds buffered-write capabilities discards writes its applications were already told had succeeded.
Q3. Resolve MDS slow requests caused by capability contention.
MDS slow requests have appeared alongside MDS_CLIENT_LATE_RELEASE warnings. One client shows 4.2 million capabilities held; the next highest holds 90,000. Users on other clients report hangs on specific files.
Q4. How can a single `find /` on a large CephFS filesystem destabilise the MDS?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Set mds_max_caps_per_client and mds_cache_memory_limit
explicitly rather than relying on client behaviour — a single scanning
process can otherwise consume everything the MDS has. Treat eviction as a
data-loss action in the runbook, because a client holding buffered writes
loses them and its applications were told they succeeded.
Cross-course references
- Kubernetes: informer caches holding references to every object have the same unbounded-growth risk
- Linux: NFS delegations and their recall behave identically, including the slow-client problem