Skip to main content
RunBook Academy

CephXXVI · Erasure Coding Trade-offsErasure Coding Trade-offs

The recovery cost of erasure coding

Advanced⏱ ~17 minceph

What you'll learn

  • Compute recovery traffic for a given profile and OSD size
  • Compare EC and replicated recovery windows
  • Identify the binding constraint during EC recovery
  • Design cluster networking around EC recovery

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

Recovery is when a storage system is tested, and EC recovery is where otherwise-sound EC designs fail. The traffic multiplier is exactly k, it is easy to compute in advance, and skipping that computation is the most common EC design error.

The arithmetic

Rebuilding an OSD holding C bytes on a profile with parameter k moves approximately C × k bytes across the cluster network.

Failed OSDProfileData to rebuildNetwork traffic
8 TBreplicated 38 TB8 TB
8 TBEC 4+28 TB32 TB
8 TBEC 8+38 TB64 TB
20 TBEC 10+420 TB200 TB
20 TBEC 17+320 TB340 TB

The bottom row is the one that ends design discussions. 340 TB on a 25 Gb link is over 30 hours at theoretical full utilisation, which you will not get while also serving clients.

Windows on real networks

Assume 50% of link capacity is available for recovery — optimistic on a busy cluster:

Traffic10 Gb25 Gb100 Gb
32 TB14 h5.7 h1.4 h
64 TB28 h11 h2.8 h
200 TB89 h36 h8.9 h

Compare that against the degraded window you are willing to accept. That comparison is the design constraint, and it usually decides both the profile and the network before capacity efficiency gets a vote.

What is actually the bottleneck

During EC recovery, in rough order of likelihood:

  1. Cluster network — k× traffic saturates links sized for client load
  2. CPU — sustained decode on wide profiles
  3. Source device IOPS — k source reads per rebuilt chunk, scattered
  4. Recovery throttles — the deliberate limit, often the right answer
# during recovery
CLUSTER_NIC=cluster_nic
ceph -s | grep recovery
iftop -i ${CLUSTER_NIC}
mpstat -P ALL 5
iostat -x 5

Identify which of the four is saturated before adjusting anything.

Design responses

  • Smaller OSDs. Halving device size halves per-failure recovery volume. This is the most effective single lever.
  • Narrower k. 8+3 moves 20% less than 10+4 per rebuilt byte and needs fewer domains.
  • Faster cluster network. Directly buys window.
  • A dedicated cluster network, so recovery does not contend with client traffic on the same links.
  • The clay plugin, which reduces recovery traffic below k× at some CPU cost — worth evaluating on wide profiles.

Quiz

Knowledge check · 4 questions

  1. Q1. An 18 TB OSD fails on an EC 8+3 pool. Approximately how much data crosses the cluster network to rebuild it?

  2. Q2. EC recovery traffic scales with k+m rather than k.

  3. Q3. Choose between profile and hardware changes to meet a recovery target.

    A design calls for 10+4 EC on 22 TB drives with a 25 Gb cluster network. The operations team requires that the cluster return to full redundancy within 12 hours of a single OSD failure.

  4. Q4. Why is reducing OSD device size the most effective single lever on EC recovery window?

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

Production discipline

Put the computed recovery window in the design document next to the capacity figure and treat it as a requirement rather than an outcome. Re-derive it whenever device sizes change — a cluster refreshed onto larger drives can silently move outside its own recovery tolerance without any configuration change at all.

Cross-course references

  • Kubernetes: rebuild time for a large stateful workload after node loss follows the same volume-over-bandwidth arithmetic
  • Linux: RAID rebuild windows on very large drives are the classic instance of this constraint