CephXXVI · Erasure Coding Trade-offsErasure Coding Trade-offs
The recovery cost of erasure coding
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
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 OSD | Profile | Data to rebuild | Network traffic |
|---|---|---|---|
| 8 TB | replicated 3 | 8 TB | 8 TB |
| 8 TB | EC 4+2 | 8 TB | 32 TB |
| 8 TB | EC 8+3 | 8 TB | 64 TB |
| 20 TB | EC 10+4 | 20 TB | 200 TB |
| 20 TB | EC 17+3 | 20 TB | 340 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:
| Traffic | 10 Gb | 25 Gb | 100 Gb |
|---|---|---|---|
| 32 TB | 14 h | 5.7 h | 1.4 h |
| 64 TB | 28 h | 11 h | 2.8 h |
| 200 TB | 89 h | 36 h | 8.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:
- Cluster network — k× traffic saturates links sized for client load
- CPU — sustained decode on wide profiles
- Source device IOPS — k source reads per rebuilt chunk, scattered
- 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
clayplugin, which reduces recovery traffic below k× at some CPU cost — worth evaluating on wide profiles.
Quiz
Knowledge check · 4 questions
Q1. An 18 TB OSD fails on an EC 8+3 pool. Approximately how much data crosses the cluster network to rebuild it?
Q2. EC recovery traffic scales with k+m rather than k.
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.
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