Use this when calculating erasure coding overhead.
Erasure Coding Overhead
Erasure coding overhead is the extra capacity used by parity fragments: a k+m scheme uses (k+m)/k of the data size, so 4+2 costs 50 % extra and 8+3 about 37.5 %, compared with 200 % for three copies.
1. EC overhead = (k+m)/k (e.g. 4+2 = 1.5×).
2. Much less than replication.
3. Small objects have extra overhead.
4. Needs k+m failure domains.
5. Recovery cost higher.
data × (k+m)/k → raw
Context & applicabilityCommon mistakes · platform/version boundaries
- EC profiles with more chunks (k+m) than failure domains.
- EC pools for small-block random writes (VM disks) without considering latency.
- Changing EC profiles on existing pools (not possible — create a new pool and migrate).
- Forgetting extra CPU and network load during recovery.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Erasure coding stores (k+m)/k times the data.
- 4+2 costs 50 % extra; 8+3 about 37.5 %.
- Each fragment must be in a separate failure domain.
ceph osd erasure-code-profile get <p>— k and mceph df— EC pool usagecalculation (k+m)/k— overhead factor
ReferenceHow it works1 section · depth on demand
Calculating EC overhead
| Profile | Efficiency | Tolerates | Minimum hosts (host failure domain) |
|---|---|---|---|
| 2+1 | 67 % | 1 | 3 (4 for recovery) |
| 4+2 | 67 % | 2 | 6 (7 recommended) |
| 8+3 | 73 % | 3 | 11 (12 recommended) |
| vSAN RAID-5 (3+1) | 75 % | 1 | 4 |
| vSAN RAID-6 (4+2) | 67 % | 2 | 6 |
EC saves capacity but costs CPU, network and latency, especially for small writes; use it for large-object and backup workloads.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
Erasure coding stores k data and m coding chunks
The Ceph erasure-code documentation defines k as the number of data chunks and m as the number of coding chunks. m is how many OSDs (or failure domains) can be lost without data loss. Space amplification is (k + m) / k.
| Profile | Raw per usable byte | Survives | Failure domains needed |
|---|---|---|---|
| 2+1 | 1.5 | 1 | 3 |
| 4+2 | 1.5 | 2 | 6 |
| 8+3 | 1.375 | 3 | 11 |
| Replication size 3 | 3.0 | 2 | 3 |
# ceph osd erasure-code-profile set ec42 k=4 m=2 crush-failure-domain=host
# ceph osd pool create data-ec erasure ec42
# ceph osd pool set data-ec allow_ec_overwrites true
# ceph osd erasure-code-profile get ec42
Documented constraints
| Point | Detail |
|---|---|
| Profile is fixed | It cannot be changed after the pool is created |
| Failure domain | crush-failure-domain keeps two chunks out of the same domain |
| RBD and CephFS | Need allow_ec_overwrites (BlueStore), with metadata in a replicated pool |
min_size | Recommended at k+1 or higher |
The cost behind the saving
- You need at least k+m failure domains. 4+2 with host failure domain needs 6 hosts, and more if the cluster should heal after losing one.
- Small writes and recovery touch many OSDs, so latency is higher than with replication.
- Erasure coding is common for object storage and archives, and less common for latency-sensitive VM disks.
Illustrative example (not a system capture).
Worked example
Erasure coding overhead = (k + m) / k. 8+3 gives 1.375×, so 100 TB of data needs ~138 TB raw instead of 300 TB with three replicas.
Costs that do not show in the ratio:
| Cost | Effect |
|---|---|
| CPU | Encode on write, decode on degraded read |
| Small objects/writes | Padding and read-modify-write; small-file workloads waste space |
| Network on rebuild | Reading k chunks to rebuild one |
| Minimum nodes | k + m failure domains (11 for 8+3) |
EC fits large objects and sequential data (backup, media, archives); replicas fit small random I/O (VMs, databases, metadata).
Examples
| Profile (k+m) | Efficiency | Tolerates | Minimum nodes (host failure domain) |
|---|---|---|---|
| 4+2 | 67 % | 2 failures | 6 (7+ recommended) |
| 8+3 | 73 % | 3 failures | 11 |
| 6+3 | 67 % | 3 failures | 9 |
Erasure coding saves space but costs CPU and has slower small writes and rebuilds than replication.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Storage Capacity → Erasure Coding Overhead. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_logical_volumes/assembly_thinly-provisioned-logical-volumes_configuring-and-managing-logical-volumes · confidence 94%