CephXXV · Erasure Coding FundamentalsErasure Coding Fundamentals
Capacity efficiency and the real cost of a profile
What you'll learn
- Compute raw-to-usable ratios for any EC profile
- Compare EC and replication capacity for equivalent durability
- Explain how small objects lose EC's capacity advantage
- Produce an accurate capacity plan for an EC pool
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
Capacity efficiency is the reason EC exists, and it is the number that gets quoted in budget meetings. The headline arithmetic is easy and the exceptions are not, and a capacity plan that uses the headline number for a pool full of small objects will be badly wrong.
The headline arithmetic
Raw bytes per user byte is (k+m)/k. Overhead is m/k.
| Profile | Raw per user byte | Overhead | Usable of 1 PB raw | Equivalent replication |
|---|---|---|---|---|
| 2+2 | 2.00 | 100% | 500 TB | size 2 |
| 4+2 | 1.50 | 50% | 667 TB | — |
| 6+3 | 1.50 | 50% | 667 TB | — |
| 8+3 | 1.375 | 37.5% | 727 TB | — |
| 10+4 | 1.40 | 40% | 714 TB | — |
| replicated size 3 | 3.00 | 200% | 333 TB | — |
Against size 3, a 4+2 pool doubles usable capacity for comparable — in
some respects better — failure tolerance. On a petabyte of raw disk that
is 334 TB of difference.
Same overhead, different durability
4+2 and 6+3 both cost 1.5× raw. They are not equivalent:
- 4+2 loses any 2 of 6 chunks → survives, needs 6 failure domains
- 6+3 loses any 3 of 9 chunks → survives, needs 9 failure domains
6+3 is strictly more durable at identical capacity cost. The price is that it needs more failure domains and touches more OSDs per operation, which costs latency and makes recovery broader.
Where the savings disappear
BlueStore allocates in units of bluestore_min_alloc_size — 4 KiB on
recent releases for both HDD and SSD, historically 64 KiB on HDD. Each EC
chunk is allocated independently.
A 16 KiB object on a 4+2 profile splits into 4 KiB data chunks:
16 KiB object → 4 data chunks of 4 KiB + 2 coding chunks of 4 KiB
= 6 allocations of 4 KiB = 24 KiB raw
= 1.5× — as expected
But on an older cluster with 64 KiB min_alloc_size:
16 KiB object → 6 chunks, each rounded up to 64 KiB
= 384 KiB raw for 16 KiB of data
= 24× overhead
The general rule: EC’s capacity advantage requires objects substantially larger than k × min_alloc_size. For 4+2 at 4 KiB that is 16 KiB and up — fine for most workloads. On legacy 64 KiB allocations it is 256 KiB and up, which excludes a great deal of real data.
ceph config get osd bluestore_min_alloc_size_hdd
ceph config get osd bluestore_min_alloc_size_ssd
Quiz
Knowledge check · 4 questions
Q1. A cluster has 1.2 PB raw. How much user data fits on an 8+3 erasure-coded pool, before fill headroom?
Q2. 4+2 and 6+3 have identical capacity overhead, and 6+3 tolerates more chunk losses.
Q3. Validate an EC capacity plan against the actual workload.
A team plans to move 200 TB of data to a 4+2 EC pool, projecting 300 TB of raw usage. The data is 1.4 billion thumbnail images averaging 140 KB each. The cluster runs HDD OSDs provisioned three years ago.
Q4. Why is bluestore_min_alloc_size not simply set as low as possible?
Passing score: 75%. Answers are checked in this browser.
Production discipline
Base EC capacity plans on measured average object size from the actual workload, not on the profile arithmetic alone, and record both in the plan so the assumption is visible. Where a workload is dominated by small objects, say so explicitly in the capacity document — it is the most common reason an EC projection misses.
Cross-course references
- Kubernetes: requests versus actual usage has the same headline-versus-reality gap
- Linux: filesystem block size and small-file waste is the identical phenomenon