CephLIX · BackfillBackfill
The client impact of backfill and how to bound it
What you'll learn
- Characterise backfill's resource profile
- Measure its client impact
- Set and enforce an impact budget
- Distinguish backfill impact from other causes
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
Backfill runs for days after a large change and its impact accumulates over that period. A latency increase that is acceptable for an hour may not be acceptable for a week, which is a different calculation from the one applied to recovery.
The resource profile
| Resource | Backfill’s use |
|---|---|
| Source device | large sequential reads |
| Destination device | large sequential writes |
| Cluster network | sustained bulk transfer |
| OSD queues | long operations ahead of client requests |
| OSD memory | scan state per PG being backfilled |
Backfill’s operations are large, so a client request queued behind one waits longer than it would behind a client request.
Measuring the impact
# before, or during a pause
ceph osd pool stats rbd-vms
rbd perf image iostat --pool rbd-vms
# during
ceph -s | grep -E 'client|recovery'
ceph osd perf | sort -k2 -n | tail -5
The comparison that matters is the client-visible one:
# from a client host
fio --name=probe --ioengine=rbd --pool=rbd-vms --rbdname=probe \
--rw=randwrite --bs=4k --iodepth=16 --runtime=60 --time_based \
--percentile_list=50:95:99
Run it during a pause and during backfill, and the difference is the impact.
Setting an impact budget
during backfill: p99 write latency may rise to 25 ms from a 12 ms baseline
duration: acceptable for up to 5 days
Both terms. A budget expressed only as a latency limit permits an indefinite backfill at that limit, which is a different commitment.
# enforce it
ceph config set osd osd_max_backfills 2
ceph config set osd osd_mclock_profile high_client_ops
Distinguishing backfill impact from other causes
ceph osd set norebalance
sleep 300
# measure client latency with backfill paused
ceph osd unset norebalance
Pausing and measuring is the definitive test. If latency does not improve during the pause, backfill is not the cause and the investigation should move elsewhere — most commonly to a single slow OSD.
ceph osd perf | sort -k2 -n | tail -5
Quiz
Knowledge check · 4 questions
Q1. How can you definitively establish whether backfill is causing a latency increase?
Q2. An impact budget for backfill should specify both a latency limit and a duration.
Q3. Investigate latency during a backfill.
Client p99 latency has doubled since a cluster expansion began. The backfill has six days remaining. The team assumes the backfill is responsible and is preparing to throttle it heavily.
Q4. Why does backfill sometimes expose a slow OSD rather than causing the slowness?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Pause backfill briefly and re-measure before concluding it is the cause of a latency increase; a marginal OSD produces the same symptom at the same time. Express backfill impact budgets as both a latency limit and a duration, since the two commitments are different.
Cross-course references
- Kubernetes: pausing a rollout to isolate whether it is causing an observed regression is the same test
- Linux: stopping background I/O to confirm attribution is standard diagnostic practice