CephLIX · BackfillBackfill
Controlling backfill speed
What you'll learn
- Identify the backfill throttles and their effects
- Distinguish them from recovery throttles
- Adjust backfill rate deliberately
- Verify a change had an effect
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 is the movement that runs for hours or days after any topology change, and it is the one most likely to affect clients over an extended period. Its throttles are separate from the recovery ones.
The settings
ceph config get osd osd_max_backfills
ceph config get osd osd_backfill_scan_min
ceph config get osd osd_backfill_scan_max
ceph config get osd osd_backfill_retry_interval
ceph config get osd osd_recovery_sleep_hdd
| Setting | Controls |
|---|---|
osd_max_backfills | concurrent backfills per OSD, in and out |
osd_backfill_scan_min / _max | objects scanned per pass |
osd_recovery_sleep_* | applies to backfill as well as recovery |
osd_backfill_retry_interval | retry delay after a backfill is rejected |
osd_max_backfills is the primary lever. It bounds both how many
backfills an OSD sources and how many it receives, so raising it increases
concurrency at both ends.
Under mClock
ceph config get osd osd_op_queue
ceph config show osd.0 | grep -E 'mclock|max_backfills'
With mClock active, osd_max_backfills may be overridden along with the
recovery throttles. The profile is again the applicable lever:
ceph config set osd osd_mclock_profile high_client_ops
Adjusting deliberately
# slow, for a busy period
ceph config set osd osd_max_backfills 1
ceph config set osd osd_recovery_sleep_hdd 0.1
# faster, for an off-peak window
ceph config set osd osd_max_backfills 8
ceph config set osd osd_recovery_sleep_hdd 0
Changes take effect without restarting daemons, so a backfill can be paced through a diurnal cycle:
# a simple schedule
0 8 * * * ceph config set osd osd_max_backfills 1
0 20 * * * ceph config set osd osd_max_backfills 8
Verifying the effect
ceph -s | grep recovery
sleep 300
ceph -s | grep recovery
If the rate does not change after a throttle adjustment, either mClock is
overriding it or the bottleneck is elsewhere — the network, the source
device, or a backfill_toofull condition.
ceph health detail | grep -i backfill
ceph osd df | sort -k17 -rn | head
Quiz
Knowledge check · 4 questions
Q1. What does `osd_max_backfills` limit?
Q2. Backfill throttle changes require restarting the OSD daemons.
Q3. Complete a long backfill sooner without additional peak impact.
A backfill following a cluster expansion is projected to take nine days at the current throttle. The throttle was set conservatively for peak-hour client latency. Overnight the cluster is largely idle.
Q4. A backfill throttle increase produces no change in rate. What are the possible causes?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Pace long backfills through the diurnal cycle rather than choosing one conservative value; the overnight window is capacity a single setting cannot use and the changes take effect immediately. Verify a throttle change had an effect — if it did not, the bottleneck is elsewhere.
Cross-course references
- Kubernetes: scheduling background work by time of day is the same capacity-shaping technique
- Linux: scheduling maintenance jobs against a load profile is standard practice