Capacity planning¶
This page turns a load (writes/s, GSIs, reads/s) into a host count and an hourly price. Every constant names the run that measured it. [UNMEASURED] marks each part that no run has measured. Treat those parts as estimates.
Scope: Redwood fleets only
Every constant here comes from fleets on the ssd-redwood-1 storage
engine, three_data_hall (3 replicas), i4i.xlarge storage hosts and one
AZ. RocksDB stays the recommended engine (see
Storage engine and disks).
No fleet with GSIs ran on RocksDB, so RocksDB fleet sizing is
[UNMEASURED]. Do not size a RocksDB fleet with these constants.
The calculation¶
inputs: W writes/s G GSIs per table, and their projection
S item size R reads/s (GetItem, Query pages)
f share of writes that are updates (the rest are inserts)
1. mutations per write m ≈ 2 + 2 × (GSIs whose key the write moves)
+ 1 × (GSIs the write inserts into)
+ 1 × (GSIs whose projected attributes change, ALL/INCLUDE only)
2. replica-mutations/s M = 3 × W × m
3. storage hosts by disk Hd = M × 0.96 / (55,000 × 0.67) (random keys)
4. storage processes by CPU P = (M × c_w + Q × 65 µs) / 0.67 core (Q = storage-server queries/s)
5. storage hosts H = max(Hd, P / storage processes per host),
rounded up to a multiple of 3 (one per data hall)
5b. host-loss check see "Losing a storage host" below; add 1 host per hall if it fails
(measured: 4 hosts per hall do not ride through a loss at 8k)
6. log, stateless, API hosts from the "Fixed tier" table
7. $/h sum of hosts × list price, + ~$0.006/h per host (IPv4 and root gp3)
Constants and where they come from¶
All rows: ssd-redwood-1, three_data_hall, i4i.xlarge storage hosts.
| Constant | Value | Run | Note |
|---|---|---|---|
| Replicas per write | 3 | every fleet (three_) |
|
Mutations per G1 write, 10 KEYS_ONLY GSIs, 80% key moves, 20% inserts (m) |
20.1 per replica | fdtw3 at 8k (2026-11-30 14:26:00–14:35:40Z); fdt3 at 8k gives 20.4; fdhl5 before the fault gives 20.1 |
Step 1 gives 20.0. |
| Mutations per IoT op (87% PutItem, no GSI) | 2.0 per replica | a6kn 200k |
|
| Write IOs per replica-mutation, random keys | 0.96 (0.95–1.02) | fdns3, fdpa3, fdt3, fdna8 at 8k (0.42–1.12 GB per storage process) |
fdhl5 gave 0.92 with 15.5 GB stored per storage process. About 14.9 GB of that was a cold table that took no writes, so cold data does not change this constant. A one-host run with a 5.1 GB written table per storage process read 1.09. A written table above 1.1 GB per storage process on a fleet: [UNMEASURED]. |
| Write IOs per replica-mutation, IoT keys | 0.77 | a6kn (2.4–4.2 GB per storage process) |
|
| i4i.xlarge NVMe write IOPS | 55,000 listed | EC2 instance docs; fleets ran 52.0–54.6k at the bound | |
| Headroom target | 67% of the bound | fdtw3 held 8k at a mean of 68% and a max of 78%. |
|
Storage-server CPU per replica-mutation (c_w), random-key GSI writes |
30.1 µs | fdtw3 8k (14.6 storage cores ÷ 483k replica-mutations/s); fdt3 8k gives 32.0 |
|
| Storage-server CPU per replica-mutation, IoT mix, reads included | 39.0 µs | a6kn soak |
Includes that mix's 13% reads. Do not add a read term for this mix. |
| Storage-server CPU per cached query | 65 µs | scale-curve 1x and 2x fit (R² 0.994; Nov 21 build) |
|
| Storage-server queries per API op | 1.65 (all ops, writes included) | scale-curve 1x (get 50%, query 10%, put 25%, update 15%; Nov 21 build) |
Per read: [UNMEASURED]. On the current build: [UNMEASURED]. |
| Storage-server CPU target | 0.67 core per storage process | One storage process is one thread. The hottest one runs ~1.3× the mean (a6kn soak). With a large store, the hottest one has less headroom: at 8k on 12 hosts, its busy share was 0.80 at 0.56 GB per storage process (fdtw3) and 0.94 at 15.5 GB, mostly cold (fdhl5). The mean did not change. With large stores, keep the mean at or below 0.6 core, or add the step 5b hosts. |
|
| Storage processes per i4i.xlarge | 2 (fdt3, fdtw3, a6kn) or 4 (fdns3, fdpa3) |
4 per host do not raise the write IOPS bound (fdns3). They add threads for CPU-bound loads. 3 per host: [UNMEASURED]. |
|
| Uncached reads | [UNMEASURED] | No fleet run had cache misses. |
Fixed tier¶
Measured layouts, all ssd-redwood-1:
| Load | Log hosts (i4i.xlarge, 1 TLog each) | Stateless (c7i.2xlarge) | API (c7i.4xlarge, 4 fdyno each) | Run |
|---|---|---|---|---|
| ≤ 8k writes/s with 10 GSIs | 6 (TLog disk: see Losing a storage host) | 3 | 3 | fdt3, fdtw3, fdns3 |
| ≤ 200k ops/s IoT | 12 | 6 | 5 | a6kn |
| ~200k ops/s, 1 KiB items, no GSI | 12 (TLog CPU 0.91–0.98: the next bound) | 6 | 6 | scale-curve 10x |
fdyno used ~0.58 ms of CPU per G1 write with 10 GSIs (fdns3 4k). API hosts
never bounded a fleet run (scale-curve: at most 44% CPU).
Worked examples¶
1. 8,000 writes/s, 10 KEYS_ONLY GSIs, 900-byte items, no reads (Tokyo list prices, ssd-redwood-1)
- M = 3 × 8,000 × 20.1 = 482,400 replica-mutations/s.
- Hd = 482,400 × 0.96 ÷ 36,850 = 12.6. Rounded up to a multiple of 3: 15 storage hosts.
- CPU: 482,400 × 30.1 µs = 14.5 cores, so 22 storage processes at 0.67, or 11 hosts at 2 per host. The disk binds first: H = 15.
This is a calibration, not a check:
c_wcomes from the same run. - Fixed tier: 6 log, 3 stateless, 3 API hosts.
- $/h: 21 × 0.403 + 3 × 0.4494 + 3 × 0.8988 + 27 × 0.006 = $12.67/h, or $0.440 per 1M writes. Prices: EC2 on-demand list, ap-northeast-1, 2026-11-30. Includes the hosts, public IPv4 and root gp3. Excludes a load host, data transfer and support.
- Measured minimum:
fdtw3held 8k on 12 storage hosts, at 68% mean and 78% max of the listed write IOPS. That leaves no spare for a lost host:fdhl5lost one host on this layout and fell below 8k (step 5b). With its load host it cost $0.430 per 1M writes;fdt3on 18 storage hosts cost $0.518. - Check: the predicted write IOPS per host at 12 hosts is 38.6k.
fdtw3measured a mean of 37.5k (−2.9%) and a max of 42.9k.
2. IoT table: 200,000 ops/s (87% PutItem, 13% GetItem/Query), no GSI (US East list prices, ssd-redwood-1)
This example is calibrated on a6kn, not checked against it: its CPU
constant comes from the same run.
- M = 200,000 × 3 × 2.0 = 1.2M replica-mutations/s.
- Hd = 1.2M × 0.77 ÷ 36,850 = 25.1, so 26 hosts by disk.
- CPU (reads included): 1.2M × 39.0 µs = 46.8 cores, so 70 storage processes.
- At 2 per host: 36 hosts (
a6knran 36 hosts with 2 each). - At 3 per host: 24, so the disk binds at 26, or 27 hosts as a multiple of 3. [UNMEASURED]
- At 2 per host: 36 hosts (
- Fixed tier: 12 log, 6 stateless, 5 API hosts.
- $/h: 2 per host: $22.53/h ($0.031 per 1M ops). 3 per host: $19.39/h ($0.027 per 1M ops). Prices: EC2 on-demand list, us-east-1, 2026-11-30; same inclusions as example 1.
Read sizing¶
The only fleet runs with reads are scale-curve 1x and 2x (Nov 21 build,
ssd-redwood-1, 2 storage processes per i4i.xlarge). Every read was a
cache hit. At the knee, storage-server CPU was the bound: all storage
processes at 0.97–0.99 core, read IOPS near 0, disk writes at 36% and
network at ~12% of the host baseline.
per storage process: 7 µs × replica-mutations/s (append-like writes)
or 30 µs × replica-mutations/s (random-key GSI writes)
+ 65 µs × storage-server queries/s ≤ 0.67 core
read-only, cached: ≤ ~10,000 storage-server queries/s per storage process
i4i.xlarge, 2 each: ≤ ~20,000 storage-server queries/s per host
- Reads go to one replica; writes go to three. A read-heavy fleet needs far fewer storage hosts per op than a write-heavy one.
- 4 storage processes per host should give up to ~2× the cached-read rate per host. [UNMEASURED] for reads.
- The API-op to storage-query factor depends on the build and the op.
Measure it on your build: status
finished_queries÷ API ops. - Uncached reads: [UNMEASURED]. A Redwood point read that misses costs about one leaf-page read. i4i.xlarge lists 100k read IOPS. CPU should still bind first unless a query needs 3 or more page reads.
Losing a storage host¶
- An outage under 60 s moves no data. FoundationDB waits 60 s
(
DATA_DISTRIBUTION_FAILURE_REACTION_TIME) before it re-replicates. At 85,000 ops/s (3c a5), the cluster was healthy 5.0 s after a storage process kill and 13.2 s after a 31 s host partition healed, with no client dip at 10 s resolution. - Host reboots took 65.7–67.0 s (
r5soak). Whether a reboot starts data movement is [UNMEASURED]. - A longer loss re-replicates inside the lost host's data hall. In
three_data_halleach team has one replica per hall. After the copy, each remaining host in that hall carriesn_h/(n_h−1)times its write load (n_h= storage hosts per hall). - Step 5b: check that
hottest-host write IOPS × n_h/(n_h−1) ≤ 0.9 × 55,000, with the hottest host ≈ 1.15 × the mean (fdtw3). If it fails, add 1 host per hall. The spare must also take the copy writes (below), so at a disk-bound load the spare host per hall is required, not a margin.- Example 1 at 15 hosts (5 per hall): hottest 35.5k × 1.25 = 44.4k ≤ 49.5k. Passes on paper. A loss on 15 hosts: [UNMEASURED].
- The 12-host minimum (
fdtw3, 4 per hall): hottest 42.9k × 1.33 = 57.2k. Fails, andfdhl5measured it (below).
- Disk: keep stored bytes per host ≤
(n_h−1)/n_h× usable disk, so the hall can absorb one host's data.
Measured: one storage host lost at 8k (fdhl5)¶
Run fdhl5 (2026-11-30, build 9ab63244): the fdtw3 layout (12 storage
hosts, 4 per hall, ssd-redwood-1), 15.5 GB stored per storage process, 8,000
G1 writes/s with 10 GSIs. One storage host (2 storage processes, 31.4 GB)
was stopped for 20 minutes, then started again.
stop ──┬─ 0–9 min: 8,000/s held; the hall's other hosts went from ~41k to 52–56k write IOPS
├─ ~10 min: their disks were full of work (load × 4/3 plus copy writes);
│ Ratekeeper limited on the storage write queue; served rate below 8,000/s
└─ 20 min: host started; copy not done
start ─── all 3 replicas back at once; TLog queues drained in ~2 min;
the rebalance kept Ratekeeper limiting for the 15 minutes measured after the restart
- The hall model holds. The extra load stayed in the lost host's hall. The other halls ran at 0.98× their load.
- The copy is bound by the survivors' disks. Data movement ran at ~110 MB/s for 5 minutes, then at ~10 MB/s once the hall's other hosts were at their write IOPS. The copy was not done after 20 minutes. On hosts with spare IOPS, use the first rate.
- TLog disk grows with all TLog input, not only the lost host's share.
The TLog disk queues grew by 17.3 GB per minute in total over 6 log
hosts (2.9 GB per minute per host), to ~59 GB each after 20 minutes.
Size the TLog disk per log host as at least
(TLog input ÷ log hosts) × (60 s + time to replace or re-copy the host) × 1.5. At 8k on 6 log hosts, an 874 GB TLog disk reaches 70% in about 3.5 hours. - What the client saw: no change for ~9 minutes. Then the writes that
change a GSI got
ThrottlingExceptionwithIndexWriteAccountLimitExceeded(the GSI apply was behind), and request latency grew for the rest of the run. 3.2% of writes failed after the SDK's retries. Over the 45-minute window, 7,744 writes/s were served of 8,000 offered. No data was wrong: every check and every GSI audit passed. - [UNMEASURED]:
- a loss on 15 hosts (5 per hall) at 8k;
- how long recovery takes after the host returns (more than 15 minutes here);
- whether the same hall factor applies to storage-server CPU.
What this does not cover¶
- Uncached reads, and RocksDB fleets.
- Data growth: cold data does not change the constants (
fdhl5, 15.5 GB per storage process, mostly cold). A large written table is measured on one host only (1.09 IOs per mutation at 5.1 GB). Disk space is not modelled: size disks by stored bytes × 3 ÷ hosts, and watchkvstore_used_bytes(Redwood reserves space, so used is larger than stored). - Hot keys and hot ranges: these rules assume spread keys. One hot range binds one storage team.
- Multi-AZ fleets: every run was one AZ with three data halls.
The runs, builds and windows are in the benchmark journal.