Use this when choosing erasure coding for object or distributed storage.
Erasure Coding · Object Storage
Erasure coding splits each object into k data and m parity fragments spread over disks or nodes, so any m can be lost. It uses less overhead than replication, for example 8+3 instead of 3 copies, at higher CPU and rebuild cost.
1. Object stores use erasure coding to protect data efficiently.
2. k data + m parity across nodes/disks.
3. Survives m failures per set.
4. Rebuild reads k chunks.
5. Plan failure domains.
object → k+m chunks → nodes
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Too few nodes for the chosen k+m.
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.
- k data + m parity fragments survive m failures.
- Overhead is (k+m)/k.
- Rebuilds use more CPU and network than replicas.
ceph osd erasure-code-profile get <p>— Ceph EC profilemc admin info <alias>— MinIO erasure setsvendor docs— durability
ReferenceHow it works1 section · depth on demand
Reference
| Profile | Efficiency | Tolerates |
|---|---|---|
| 4+2 | 67 % | 2 failures |
| 8+3 | 73 % | 3 failures |
| 12+4 | 75 % | 4 failures |
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
Erasure coding in object storage: cheaper durability than full copies
Object stores usually protect data with erasure coding instead of three full copies. Each object is split into k data chunks plus m coding chunks, placed on different disks, hosts or racks. Any k chunks rebuild the object.
Ceph as the reference
The Ceph erasure-code documentation defines k and m. It gives space amplification as (k + m) / k: a 4+2 profile uses 1.5× raw space, against 3.0× for three-way replication. The profile is fixed when the pool is created, and crush-failure-domain keeps chunks in separate failure domains. A profile like k=3 m=2 crush-failure-domain=rack survives two lost racks.
# ceph osd erasure-code-profile set rgw-ec k=4 m=2 crush-failure-domain=host
# ceph osd pool create default.rgw.buckets.data 128 128 erasure rgw-ec
# ceph osd pool application enable default.rgw.buckets.data rgw
# ceph df | grep buckets.data
Choosing k and m
| Profile | Overhead | Survives | Failure domains (min) |
|---|---|---|---|
| 4+2 | 1.5× | 2 | 6 |
| 6+3 | 1.5× | 3 | 9 |
| 8+3 | 1.375× | 3 | 11 |
| 3× replication | 3.0× | 2 | 3 |
Trade-offs
| Aspect | Erasure coding | Replication |
|---|---|---|
| Capacity cost | Lower | Higher |
| Small-object efficiency | Worse (chunk padding, many shards) | Better |
| Read and write latency | Higher (k+m OSDs involved) | Lower |
| Recovery traffic | Reads k chunks to rebuild one | Copies one replica |
| Typical use | Large objects, archives, backups | Metadata, small objects, VM disks |
Object stores often mix both: index and metadata pools replicated, data pools erasure coded. Plan more failure domains than k+m, so the cluster can rebuild after losing one.
Documented example, not captured output.
Quick reference
Erasure coding splits an object into k data fragments plus m parity fragments spread across drives or nodes; any k fragments rebuild the object. 8+3 tolerates 3 failures with 37.5 % overhead, compared with 200 % for three full replicas. It costs CPU and network on writes and rebuilds, so small objects are often replicated instead.
Reference
Object stores spread each object as k data + m parity chunks across drives or nodes (e.g. 8+3). Any k chunks rebuild the object. Efficiency k/(k+m) is much better than 3× replication, at the cost of more CPU and network during writes and repairs.
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 Object Storage → Erasure Coding. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.snia.org/tech_activities/standards/curr_standards/cdmi · confidence 94%