Skip to main content
RunBook Academy

CephLX · Recovery TuningRecovery Tuning

The client versus recovery trade-off

Intermediate⏱ ~16 minceph

What you'll learn

  • Frame recovery tuning as an explicit trade-off
  • Identify what is being traded in each direction
  • Choose a position deliberately rather than by default
  • Communicate the choice to stakeholders

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

Not yet marked complete on this device.

Why this matters in production

There is no setting that makes recovery fast and free. The devices and the network are finite, and recovery consumes what clients would otherwise use. Tuning is choosing a point on that curve, not escaping it.

What is traded

DirectionGainsCosts
Faster recoveryshorter degraded windowhigher client latency
Slower recoverylower client latencylonger degraded window

The degraded window is the period during which a further failure could cause data loss or unavailability. That is the quantity being traded for latency, and stating it that way changes the conversation.

The curve is not linear

ceph config set osd osd_max_backfills 1     # baseline
ceph config set osd osd_max_backfills 2     # roughly 2x recovery, small latency change
ceph config set osd osd_max_backfills 8     # marginal recovery gain, large latency change

Devices have headroom, and consuming it costs little until it runs out — after which latency rises steeply. The useful position is at the knee of that curve, which is found by measurement rather than by choosing a number.

Choosing a position deliberately

Three positions and when each is right:

PositionWhen
Recovery firsta second failure would lose data; min_size is at risk
Balancedordinary single-OSD recovery on a healthy cluster
Clients firsta planned expansion with full redundancy throughout
# recovery first
ceph config set osd osd_mclock_profile high_recovery_ops

# clients first
ceph config set osd osd_mclock_profile high_client_ops

# balanced
ceph config set osd osd_mclock_profile balanced

The position should follow from the redundancy state, not from a standing preference.

Communicating the choice

The trade is legible to non-operators when framed as exposure:

Recovery will complete in four hours with client latency at roughly twice baseline, or in sixteen hours at close to baseline. During the recovery a second disk failure in the same rack would take the affected pool offline. Which window do you want?

That is a question stakeholders can answer. “Should I raise osd_max_backfills?” is not.

Quiz

Knowledge check · 4 questions

  1. Q1. What is actually being traded when recovery is slowed to protect client latency?

  2. Q2. Raising recovery concurrency produces a proportional increase in client latency at every level.

  3. Q3. Choose a tuning position during an incident.

    A pool with size=3, min_size=2 has lost two OSDs in the same rack. One PG is at two copies. Recovery is running at the default balanced profile and will take nine hours.

  4. Q4. Rewrite "should I raise osd_max_backfills?" as a question a stakeholder can answer.

Passing score: 75%. Answers are checked in this browser.

Production discipline

Set the tuning position from the redundancy state — recovery-first when a further failure would breach min_size, clients-first during a planned expansion — and reset it when the state changes. Present the trade to stakeholders as exposure duration against latency, which is a question they can answer.

Cross-course references

  • Kubernetes: pod disruption budgets encode the same exposure-versus-velocity trade
  • Linux: RAID rebuild rate limits present exactly this choice