Performance¶
Topology, disks, network, item size and request mix determine throughput and latency. These measurements are not capacity or latency promises.
fdyno receives signed HTTP requests and sends database operations through the FoundationDB client.
What each call costs¶
Common path: cached metadata, default item layout, item under 10,000 bytes, no index, stream or TTL. Small writes mainly wait for commit; reads wait for a read version and storage. fdyno adds parsing, signature checks, JSON and validation. FoundationDB supplies read versions, storage-server reads, mutations and transaction-log commits.
| Call | Read versions | Reads | Commit |
|---|---|---|---|
GetItem |
1 | 1 point read | none |
PutItem, no condition, no return values |
1 | the table revision only, often shared with concurrent writes; the item is not read | 1: the item |
PutItem with a condition or return values, Update |
1 | the item and the table revision, one round trip | 1: the item |
Delete, no condition, no return values |
1 | the table revision only, often shared with concurrent writes | 1: the delete |
Batch, Transact, read-only Execute, Batch of SELECTs |
1 per request | every item at once | none |
Transact (fdbget attempt) |
1 per request | every item and the token record, one round trip | 1: every item, plus the token record if the request has a token |
Query, Scan |
1 per page | 1 range read per page | none |
Revision checks validate cached metadata; one read version shares one check. A write stores no retry record: an unknown commit is retried only for tokened transactions. Pooled transactions keep regular-path semantics. Projection parsing happens once per page; projection reduces response bytes, not storage reads or capacity.
Where the CPU goes¶
Start with one fdyno process per 2–4 vCPU. By default a process has one FoundationDB client network thread. That thread can saturate before the host runs out of CPU for Go request work. More processes add client network threads. They do not add FoundationDB capacity.
Go requests and the FoundationDB client¶
Each fdyno process runs one FoundationDB client network thread
(fdb_run_network) by default. It drives the client's network I/O and
completes futures. Go request goroutines run on other threads and enter the
client through cgo calls. Some work, such as building a commit's mutation
buffer, happens on the caller's thread first. When the network thread
saturates, requests can wait for it even if the host has idle CPU.
fdyno opens one database handle per process. To add network threads, run
more processes. In the
strong GetItem sweep, a second process
scaled reads further than a second client thread did.
A Go CPU profile does not show this cost directly. Time under
runtime.cgocall can include time under fdb_run_network, not only the cost
of entering C. Native and Go profilers cover native frames differently, so do
not add their numbers. Native frames without symbols cannot separate
serialization from other client work.
Calls and futures by route¶
These counts come from the code path, not from a measurement. They count FoundationDB transaction calls and future-producing operations for one successful first attempt on the fdbget write path. They exclude future collection and destruction, and they are not Go-to-C crossings, callback calls or network round trips.
| Route | FDB transaction calls, 1 / 2 GSIs | Futures | Work |
|---|---|---|---|
PutItem, value unchanged |
7 / 7 | 4 | Reset and timeout option (2); three reads issued together in one crossing: old item, table revision and read version (3); one set: the item (1); commit (1). |
PutItem, non-key value changed |
8 / 9 | 4 | One more set per GSI whose projected value changes. The index keys do not move. |
Update, non-key value changed |
8 / 9 | 4 | Same writes as PutItem; base and index values change. |
The futures are the old item, the table revision, the read version and the
commit. The sources below are at the commit these counts were read from.
That commit also wrote two extra record keys per write, which v0.1 does not
write. The counts above leave them out:
reset and options,
timeout always set on writes,
item, revision and read version in one crossing and
in C,
one call per mutation,
commit,
item set and
for UpdateItem,
index entries.
The counts assume these conditions:
- The item exists and is read (not a blind write).
- No throttle tags (each adds one option call).
- The item and its projections are stored in one value each, not in chunks.
ALLprojections, and the item has the key attributes of each counted GSI.- Streams, PITR, TTL and LSIs are off (PITR logs a change even with no stream).
- No sampled commit-size probe (one more call and future).
The GSI counts are from before GSIs became asynchronous. Now a write does not
set GSI entries. It sets one GSI change record per changed item, one
versionstamped key per record chunk
(gsi_log.go),
and a background applier writes the entries later.
Strong GetItem and Query are not listed because their counts are not
constant. Each starts with a read version. While no table metadata changed
in the cluster, the metadata check reads only the metadata version, which
comes with the read version. Otherwise it reads the table revision once
(revisionCurrent in getitem_reader.go).
A request whose time left is not within 100 ms below the default
transaction timeout adds one option call to set its own timeout.
What adds work¶
| Feature | Cost |
|---|---|
| LSIs, TTL index, streams | Read the old item; commit every LSI entry, expiry entry and stream image with the write. More LSIs, ALL projections and NEW_ add latency/size. |
| GSIs | Read the old item; commit one GSI change record with the write, which holds the old and new entry of every GSI that changes. A background applier writes the GSI entries after the write returns. More GSIs and ALL projections make the record larger and add applier work (GSI fan-out fleet). |
| Moved GSI entries | In matched Update counts, moving a 24,000-byte chunked ALL projection used two fewer FoundationDB mutations per GSI by skipping empty range clears. The 1 KiB case was unchanged. |
| Large items | Above 10,000 encoded bytes, read/write chunks. Default-layout writes rewrite the whole item. |
| TTL | Writes add an expiry-index entry. |
| Conditions/return values | Read the item first. |
Batch |
Runs on the Transact fdbget path: one read version, one round of old-item reads (only with indexes, streams or capacity), one commit for all mutations. A batch over the transaction cap is split into chunks, one commit each. |
| Reads | Fresh read version; each Query page is separate. |
| Background work | TTL, trimming and cleanup use disk/CPU at batch priority, escalating after an incomplete-pass bound. Worker rules. |
Hot items¶
Each process queues eligible same-item writes
in arrival order. Different processes still conflict/retry.
A projected wait beyond the deadline returns retryable, uncommitted
ProvisionedThroughputExceededException.
Commit latency bounds one item's rate; spread writes.
How the same-item queue accepts a write¶
The queue only orders work inside one process. It decides which writer can
start, not how writes reach FoundationDB. The holder runs its write as its own
transaction, with its own result and stream record. Conflicts with other processes are still detected and
retried
(hotkey.go).
A single-item write holds one item. TransactWriteItems and
BatchWriteItem hold every item they read, taken one at a time in byte order
of the item key, so two requests cannot deadlock.
A write skips the queue if fdyno cannot derive its item key from cached table metadata (an unknown table or an invalid key). A blind write skips it too. A blind write is one of these:
- a
PutItemthat does not need the old item; - a
DeleteItemthat has no condition, no returned values or capacity, and no old image to maintain for an index, stream, PITR or TTL.
| Step | Check | Outcome |
|---|---|---|
| 1 | A single-item write: is the item free? | Free: the write takes the item at once; go to step 4. Held: go to step 2. |
| 2 | Is a queue bound reached? | Reached: Provisioned now. |
| 3 | Is the projected finish after accept-by? | After: Provisioned now. Otherwise the write waits in FIFO order; if its deadline passes in the queue: Provisioned. |
| 4 | The item is granted. Is enough budget left? | Enough: run the transaction, then pass the item to the next writer in FIFO order. Not enough: refused before the transaction starts; after a wait in the queue, the error is Provisioned; with no wait, Throttling. |
| Term | Value |
|---|---|
| Hold time | Grant to release: the read, the commit and any FoundationDB conflict retries. Each item keeps an average of its hold times; a new sample has weight 1/8. An item's average lasts only while it has a holder or a queue; when the last holder releases with nobody queued, it is dropped. An item with no finished hold uses the process-wide average. With no samples, the estimated hold is zero; the queue bounds and the accept-by check still apply. |
| Projected finish | The holder's expected remaining hold (average minus time held so far, never below zero), plus one average hold per writer already queued, plus one for this write. |
| Accept-by | The operation deadline minus a margin. The margin is the smaller of the commit safety margin and 1/20 of the budget when the write arrived. The commit safety margin is 1/20 of DYNODB_, at least 5 ms and at most 1 s. |
| Queue bounds | 4,096 writers behind one item (not counting the holder) and 65,536 in the process. They bound memory; the projection decides which writes the queue accepts. |
Every refusal happens before the write's transaction starts, so the write
is definitely not committed. A refusal by a queue bound or by projection is
ProvisionedThroughputExceededException with the throttling reason
TableWriteKeyRangeThroughputExceeded, which SDKs retry. A refusal by projection
counts in fdyno_hotkey_wait_rejections_total and one by a queue bound in
fdyno_hotkey_queue_rejections_total.
The projection is an estimate. An accepted write can still get the same error. This happens when its deadline passes in the queue, or when it reaches its turn with less than the margin left.
A write can get its items without a wait but have less than the margin left.
fdyno refuses it with ThrottlingException
(AccountLimitExceeded, FoundationDB throttling). This is not a key-range
throughput error, because no queue took its budget. The margin is at most 1/20 of the
budget the write arrived with. So this happens only when more than 19/20 of
that budget passes before the write gets its items. In practice, the write
arrived with almost no budget left, or the process stalled. A write whose
request is cancelled while it waits does not get a throughput error either.
At the default limits, the per-item bound is below the process bound, so one
hot item cannot fill the whole process queue. One item can fill a positive
process bound if
the per-item bound is 0 or at least that large. See
the queue metrics and
settings.
When FoundationDB stalls¶
A transaction first needs a read version from FoundationDB's proxies. A request
waits for it until its time budget ends (DYNODB_OPERATION_TIMEOUT, 30 s) or
the client cancels. fdyno never cancels a request it already sent
(transaction_runner.go).
fdyno does not refuse a request early because a read version is slow. If
the budget ends before a commit is sent, the request gets 400
ThrottlingException and is definitely not committed (see
Writes and Overload).
| Event | What happens in the FIFO simulation |
|---|---|
| Stall | Sent read-version requests queue in FIFO order. |
| Cancel | The client stops waiting, but its queued request still takes a grant later. |
| Retry | The new request joins the back of the queue. |
fdyno waits because cancelling can waste the grants that end a stall. A FIFO simulation running the real handlers had 6 s with no grants, then 17 grants/s, with 10 fresh reads/s plus bounded retries. Waiting completed 460 of 460 reads. Cancellation completed 0 of 460, and all 680 grants released during load went to cancelled requests. This is a model result, not a native FoundationDB throughput result; a separate capped native write comparison did not reproduce the collapse. See why cancelling sent work can collapse goodput.
Operating limits¶
Note
The measurements from here to the end of "Cluster version 10 at 10× storage" come from pre-v0.1 builds. Those builds wrote an extra record for every write request; v0.1 does not.
Unless noted, the fleet used six i4i.xlarge storage hosts, three log hosts,
ssd-redwood-1, and three c7i.xlarge API hosts. Each run used its build's
defaults unless stated. The rates in this table used the build default,
cluster version 3.
| Workload | Limit | Setting |
|---|---|---|
| TTL reclaim, per cluster | Eligible at TTL + DYNODB_ (one minute) by the local clock. Uncapped batch-priority deletes run for half the interval: up to 16 ranges/table, 4/process concurrently. For 3,000,000 expired items, three processes drained 22,300/s on the first build and 36,300/s on a follow-up; one drained 20,700/s on the first build (n=1/point; first run aws-20261118-cliffs-ttl, build bbce6f7b; follow-up aws-20261118-cliffs-combo, build cd437b7d). These rates divide the seed count by the time from first expiry to the drained sample. They do not isolate storage from range contention. In the first build at 16,000 expiring writes/s, sampled oldest-eligible minute-bucket age peaked at 78 s, not a physical-deletion bound. That predates the 60 s margin; fdyno_ uses margin-adjusted ttlNow(), not wall-clock deletion latency. At the higher load, the measured write rate was 31,300/s. Deletes averaged 15,400/s over the sample window, which includes the first minute before any item expired (19,200/s from first expiry). Deletes fell behind until writes stopped. |
DYNODB_ |
| Stream, per table | One shard initially. The lease holder can double a stream at most once per check (30 s by default) if the estimated average exceeds 1 MiB/s per shard and the new count fits the shard cap. One reader kept up at 6,000 writes/s, fell behind at 16,600 (run aws-20261118-cliffs, build 38eac5ce). With automatic splits (1 to 32 active shards) and parent-first readers at 16,000/23,000 writes/s (n=1 each; run aws-20261118-cliffs-combo, build cd437b7d), lag through drain had p99 2.26/3.53 s and max 2.90/3.93 s. Progress samples in the final 2 min of the write phase had max lag 0.258/0.331 s. After drain: zero missing, duplicate or out-of-order records. |
DYNODB_, DYNODB_ |
| GSI writes | Write work grows linearly with the GSIs whose key or projection changes (0 to 10 GSIs measured): with every key moved, about two FoundationDB mutations per GSI and 24.0 + 19.6 µs × GSIs of inverse throughput (fit). Measured with 256 clients (median of three 45 s trials; run aws-20261118-cliffs-gsi, build 1f6ba958, when GSI entries were written in the base write): PutItem moving every GSI entry reached 40,800/s with no GSI, 26,100/s with one, 15,000/s two, 8,000/s five and 4,700/s ten, with zero client errors. At ten GSIs, writes keeping the GSI key: 7,100/s with ALL projections, 34,600/s with KEYS_ONLY (no index write). |
project only what queries read; keep GSI keys stable on hot writes |
| Item size | A 399,000-byte item was written and read with no errors. At 256 KiB and above, the API hosts and the load generator exceeded their network allowance, so those rates are not fdyno limits. At 64 KiB, PutItem was limited by the load generator (run aws-20261118-cliffs, build 38eac5ce). |
none |
Parallel Scan |
For 1 KiB items, about 81,000 items/s at 4 segments and 86,000 at 16 (one segment: 48,000; run aws-20261118-cliffs, build 38eac5ce). |
none |
| Mixed workload, per cluster | About 150,000 operations/s (run fdyno-scale-p1r3; its build was not recorded): in-cache 1 KiB items, 50% GetItem / 25% PutItem / 15% UpdateItem / 10% Query. Separate three-hall ssd-redwood-1 fleet: 12 i4i.xlarge storage hosts with two storage processes per host, and four API hosts with four fdyno processes each. Storage-bound; no DeleteItem in this mix. |
add storage hosts |
| Aggregate network traffic | Median 27.0 KB per mixed operation in the same run. The estimate divides RX+TX bytes across all hosts by (achieved operations/s × the step's 39.75–40.00 s NIC sampling interval). Flows were not classified by AZ; this is not cross-AZ traffic or a transfer-cost estimate. | measure flows by AZ for transfer sizing |
Chart: TTL reclaim rates of three recorded runs.
Chart: stream lag of the 16,000 and 23,000 writes/s automatic-split runs.
EC2 scale-out¶
FoundationDB 7.3.51, triple, ssd-2 or Redwood (ssd-redwood-1), one AZ.
- Storage: 3, 6 or 12 i4i.xlarge hosts.
- Logs and stateless roles: 3 i4i.xlarge log hosts and 2 c7i.xlarge stateless hosts.
- API: 1 or 3 active c7i.xlarge hosts, and one c7i.4xlarge client.
Uniform keys, 2 million items with
1,024-byte data fields, signed HTTP, no TLS, indexes, streams or coalescing.
Each point has n=3, 2 s warmup and 15 s measurement, and concurrency 8–4,096.
Client CPU stayed below 70% (campaign aws-20261117-scaleout, November 17, 2026;
cluster version not recorded, a build before version 9).
Best qualified medians with three API hosts; each operation selects its own concurrency:
| Engine / storage hosts | GetItem ops/s | PutItem ops/s | Put p99 ms |
|---|---|---|---|
| ssd-2 / 3 | 158,157 | 22,777 | 158.0 |
| ssd-2 / 6 | 172,551 | 41,902 | 44.9 |
| ssd-2 / 12 | 159,127 | 63,097 | 30.2 |
| Redwood / 3 | 152,198 | 27,682 | 86.1 |
| Redwood / 6 | 173,875 | 53,163 | 85.3 |
| Redwood / 12 | 164,188 | 54,964 | 17.6 |
Three API hosts delivered 2.7–3.1× the single-host GetItem rate. Storage-only read scaling was not monotonic. There were 906 qualified windows and 618,647,702 requests, with zero client or final request errors. Short peaks, not capacity or latency promises.
Chart: best qualified medians of the EC2 scale-out sweep, by engine and storage-host count.
The 12-host Redwood sweep reached 181,135,675 items: 518.2 GiB of
triplicated data-field bytes versus 384 GiB storage-host RAM.
GetItem reached 149,520 ops/s (p99 10.45 ms), PutItem 59,127 (p99 81.63 ms),
with n=3 per point and three API hosts (same campaign, run s12-redwood-r1/large-f3).
This does not prove uncached reads, and no larger-than-RAM ssd-2 run was measured.
Mixed workload in one AZ¶
A separate single-AZ storage ladder
ran a 50/25/15/10 Get/Put/Update/Query mix on in-cache 1 KiB items. It used
Redwood, three_data_hall, build 7204df91 and its default cluster version 3 (runs s1az-r-A through
s1az-r-D in row order).
| Storage hosts × processes | API hosts | Best sustained ops/s | Per storage host |
|---|---|---|---|
| 12 × 2 | 6 | 148,657 | 12,388 |
| 12 × 3 | 6 | 166,976 | 13,915 |
| 12 × 4 | 6 | 149,853 | 12,488 |
| 24 × 2 | 8 | 212,191 | 8,841 |
Doubling storage hosts with two processes each gave 1.43× (1.27× against the best 12-host layout), not 2×. Storage CPU and ratekeeper storage-write limits were the limiter evidence at the first unsustained step. The cause of the less-than-linear gain is not identified.
Storage scaling curve¶
A later scaling curve
ran the same mix and fixed tier (six API hosts, 12 logs) in one AZ, on ssd-redwood-1. It used
3, 6, 15 and 30 storage hosts, two processes each, with one run per point. It was
measured on build 7204df91 at its default, cluster version 3 (fdyno-sc1x-a1,
fdyno-sc2x-a1, fdyno-sc5x-a1, fdyno-sc10x-a1). Efficiency is
the best sustained rate over n times the 1x rate. The lower bound uses the
1x first unsustained rate instead.
| Storage hosts | Best sustained ops/s | Per storage host | Efficiency | Lower bound | List $ per billion operations |
|---|---|---|---|---|---|
| 3 | 44,959 | 14,986 | 1.00 | 0.85 | 77.53 |
| 6 | 79,790 | 13,298 | 0.89 | 0.76 | 47.34 |
| 15 | 159,588 | 10,639 | 0.71 | 0.60 | 29.16 |
| 30 | 201,113 | 6,704 | 0.45 | 0.38 | 30.39 |
Ten times the storage gave 4.5× the throughput. The older ladder's 24-host
run (212,191 ops/s; cluster version 3, s1az-r-D) is above the 30-host point
here. It ran in another Region with eight API hosts, and each is one run.
At 3 and 6 hosts the limiter was storage CPU. From 15 hosts on, a few hot storage processes set it. At 30 hosts, ratekeeper throttled on the write queue of one storage process. That process took 5.5× the median input. No storage process reached 0.9 core.
The 12 TLogs ran at 0.91–0.98 core at 30 hosts. They were not the limiter, but near one core each they are the next risk. Which keys the hot process held is not established in this run.
Cost is a list-price estimate for the whole fleet at the best sustained rate, not an invoice. It stopped falling after 15 storage hosts.
Cluster version 10 at 10× storage¶
At 30 storage hosts on ssd-redwood-1, cluster version 10 sustained 305,902 offered ops/s in one
150-second hold (fdyno-v10l10x-a1, build 3c9900ea). Updates reached 95.29% of their target,
slightly above the 95% threshold. A repeat (fdyno-v10l10x-a3, build
2da9f3ee) missed that step with updates at 89.27%. The repeat sustained the 266,002 offered ops/s
step. Its longer hold at that rate met the throughput, error, and latency
thresholds. It did not qualify, because the harness could not decode the
FoundationDB status response.
The two runs put the bend around 266,000–306,000 offered ops/s, not at a proven ceiling. The bottleneck is not established.
GSI fan-out fleet¶
The GSI fan-out runs (G1-FD, November 2026) used one 17-host fleet shape in
one AZ. FoundationDB 7.3.51, three_data_hall ssd-redwood-1, 6 logs,
4 commit proxies, 2 GRV proxies and 2 resolvers.
| Role | Hosts | Processes per host | Memory / cache per process |
|---|---|---|---|
| Storage | 6 × i4i.xlarge (4 vCPU, 32 GiB, one NVMe disk) | 2 storage | 13,824 / 7,603 MiB |
| Log | 6 × i4i.xlarge | 2 transaction | 8,192 / 512 MiB |
| Stateless | 3 × c7i.2xlarge | 4 stateless | 3,328 / 256 MiB |
| API | 1 × c7i.4xlarge | 4 fdyno | not applicable |
| Load generator | 1 × c7i.4xlarge | dynamobench | not applicable |
Each host is its own FoundationDB zone (locality-zoneid = host name).
Data halls rotate over the hosts: storage hosts 0 to 5 are in halls 0, 1,
2, 0, 1, 2, so each hall holds two storage hosts. The storage cache is
0.55 of process memory. Each host keeps memory for the OS (2 GiB on the
32 GiB hosts, 1 GiB on the 16 GiB hosts), plus 3 GiB on storage and log
hosts and 2 GiB on stateless hosts.
On this fleet, with ten KEYS_ONLY GSIs on one table, run fd2 (build
efdc1ad3, us-east-2, n=1) sustained 2,000 writes/s. At 4,000 writes/s
it delivered the rate, but the storage queue grew. At 8,000 it delivered
about 5,400. Ratekeeper was limited by the storage server write queue.
On a 31-host fleet (18 storage hosts with two storage processes each, three
API hosts; run fdt3, build efdc1ad3, ap-northeast-1, n=1), ten GSIs held
8,000 writes/s, and 16,000 was UNKNOWN. A 25-host fleet with 12 storage
hosts (run fdtw3, the same build, ap-northeast-1, n=1) also held 8,000
writes/s, at $0.430 per 1M writes against $0.518 for fdt3. Results for 0, 1, 5 and 10 GSIs on
both fleet sizes are in the
benchmark journal.
What limits N10 on this fleet. Three later runs (ap-northeast-1a,
n=1 each) used build 6b35e801 with the same list. Each ran 2,000, 4,000 and
8,000 writes/s.
| Run | Change | Writes/s delivered at 8,000 | Put p99 at 2,000 / 4,000 | FDB bytes written per write |
|---|---|---|---|---|
fdna8 |
none (2 storage processes per host) | 5,867 | 36 / 75 ms | 8,628 |
fdnb7 |
GSI change record format 2 (f8fd37a9) |
5,626 | 42 / 86 ms | 6,811 |
fdns3 |
4 storage processes per host (24 in total, 6,912 / 3,801 MiB each) | 5,940 | 20 / 49 ms | 8,625 |
Two more runs (fdpa3 and fdpb3, ap-northeast-1a, run at the same time,
n=1 each) used the fdns3 layout. fdpa3 used main build 8fb6d4d2.
fdpb3 used build 5bacb8b5 (branch gsi-log-payload-in-item, cluster
version 13, not merged). In that build, a pending GSI change record is kept in
its item's key range instead of in the shared GSI change log.
| Run | Writes/s delivered at 8,000 | Put p99 at 2,000 / 4,000 | FDB bytes written per write at 4,000 | Input of the 3 busiest storage processes ÷ median, at 4,000 / 8,000 |
|---|---|---|---|---|
fdpa3 |
6,171 | 15 / 65 ms | 8,641 | 3.05 / 1.54 |
fdpb3 |
5,674 | 14 / 46 ms | 8,763 | 1.18 / 1.25 |
In all five runs, 8,000 writes/s was not delivered. Ratekeeper was limited by the storage server write queue, and the worst queue was about 1.5 GB.
- Format 2 decreases bytes, not the limit. It writes 21% fewer FDB bytes and 11% less storage input per write. The rate at 8,000 did not increase.
- Four storage processes per host decrease latency, not the limit. Put p99 at 2,000 and 4,000 writes/s decreased by 35% to 46%. Mean storage process CPU at 8,000 decreased from 0.84 to 0.51 core. The rate at 8,000 did not increase.
- The input is skewed onto the storage team that holds the GSI change log
tails (confirmed by shard maps). The three storage processes with the most input
are always one per data hall, which is one team. When the fleet changed from
12 to 24 storage processes, the median input per process decreased by half.
The input of the hot team stayed almost the same. Each base write appends one
GSI change record to the table's GSI change log,
(gl, shard, versionstamp), in 8 log shards. Keys that increase with the versionstamp go to the end of each log shard. The log is cleared after the apply, so its data is small, and data distribution does not split it by size. Two single-host checks read the shard map directly (FoundationDBssd-redwood-1with its data on RAM storage (tmpfs), thefd-l-n10write mix). Their input figures show the skew, not disk rates:- 6 storage processes, double replication, 4,000 writes/s (build not
recorded): the shards
[table start, gl/2)and[gl/2, gl/7)were on one storage process, and that process had the most input (23.1 MB/s against 6.9 to 19.3 MB/s). Items and index entries were in 16 shards on all 6 processes. - 4 storage processes, single replication, 4,000 writes/s, two runs per
build in the order A B B A: the storage process with the most input always
held the table start (the GSI cursor
gcand the first log shards). Its extra input followed how many of the 8 log tails it held.
- 6 storage processes, double replication, 4,000 writes/s (build not
recorded): the shards
- Format 2 decreases bytes, not the hot team. In the same 4-process runs,
format 2 (
c2b8e401, product code equal toe252dd26) wrote 21% fewer bytes (24.1 against 30.5 MB/s). The extra input of the hottest process was +18.5 and +16.2 MB/s with format 1 (b550f9cb) and +3.6 and +18.0 MB/s with format 2. With two runs per build the spread is large. In the run where one process held all 8 log tails, format 2 had the same extra input as format 1. - Removing the log tails removes the skew, not the limit. In
fdpb3the 3 busiest storage processes took 1.18 times the median input at 4,000 writes/s (fdpa3: 3.05), and the busiest one took at most 51.8 MB/s at 8,000 (fdpa3: 94.4 MB/s). Butfdpb3delivered 5,674 writes/s at 8,000 against 6,171 forfdpa3. In both runs one storage process still had a write queue of about 1.4 GB. - What limits this fleet at 8,000 writes/s. At the limit, each storage
host took about 91 to 107 MB/s of storage input (
fdna891,fdns394,fdpa3107,fdpb394: delivered writes/s × storage input bytes per write from FoundationDB status ÷ 6 storage hosts). The harness byte counters give 99 forfdna8and 100 forfdns3; they were not recorded at 8,000 infdpa3andfdpb3. That held with 2 or 4 storage processes per host and with skewed or even input. - The limit is the write IOPS of the storage disks. At 8,000 writes/s the
storage hosts' NVMe disks ran at 51,200 to 54,100 write I/Os per second on
average per run, and the busiest host in each run at 54,200 to 54,600. With
even input (
fdpb3), all 6 hosts ran at 53,700 to 54,300. AWS lists 55,000 write IOPS for the i4i.xlarge disk.ssd-redwood-1wrote about 8 KiB per I/O, and 4.2 to 4.8 bytes to disk for each byte that a storage process made durable. The AWS figure is for 4 KiB writes, so the disk may limit bytes (about 440 MB/s per host) as well as operations. Ratekeeper only reports this limit: it holds the limiting storage queue at its target of about 1 GB. Size a GSI-heavy cluster by the write IOPS of its storage hosts: add hosts, or use hosts with more NVMe write IOPS (not tested). RocksDB was not measured with GSI-heavy writes. - Sizing by write IOPS held in one test. With 10 GSIs, one i4i.xlarge
storage host reached its disk limit at about 3,000 replica writes/s (each
write is stored 3 times). For 8,000 writes/s on 12 storage hosts, that gives
2,000 replica writes/s and about 36,700 write IOPS per host. Run
fdtw3(buildefdc1ad3,ssd-redwood-1, ap-northeast-1, n=1) held 8,000 writes/s on 12 storage hosts. The hosts ran at 37,492 write IOPS on average, and the busiest at 42,893, 78% of the 55,000 that AWS lists. See the benchmark journal. Capacity planning gives the full calculation and the host-loss check. - GSI lag grows before the write rate stops.
fdtw3(12 storage hosts) held 8,000 writes/s, but its GSI lag was higher than infdt3(18 storage hosts, same build). GRV, the log queue and Ratekeeper were the same. The storage processes were busier: the team with the GSI change log tails used 0.79 core against 0.69, and its data lag was 2.4 times higher. Each GSI apply transaction reads from that team. If your readers need a low GSI lag, plan storage hosts with headroom over the highest rate they hold: add storage hosts. In these runs, the median storage host ran at 44% of its listed write IOPS infdt3and 68% infdtw3. One run each. fdyno gives no bound on GSI lag. - On a host with a faster disk, bytes per write count. On one host with an instance-store NVMe disk and 4 storage processes, the disk ran far below its limit (55,000 to 71,000 of 239,000 write IOPS). The rate held followed storage input instead: a 5,400-byte item lowered the rate held from 6,000–6,750 to 4,500–5,250 writes/s with 10 GSIs, with almost the same disk I/Os per write. Halving the GSIs (5) held every rate tested, up to 7,500. See the benchmark journal.
- The disk
busyfield does not show this limit.fdna8read 0.29 busy at 53,500 write IOPS, because the NVMe disk serves many I/Os at once. Read the write rate (disk.writes.hzinstatus json) instead.
To repeat the single-host check, run tools/glteam/measure.sh (see
tools/glteam/README.md). It prints the input of each storage process and
which processes hold the gl and gc shards. It keeps the FoundationDB data
under /tmp; where /tmp is tmpfs, the data is in RAM, so its rates are
CPU-bound one-host figures, not disk or fleet rates.
The index keys and item keys of this workload are uniform: 4,096 tenants with the same share, one value per GSI hash key, and random sort keys. So no single GSI key is hot.
Settings and their trade-offs¶
Defaults and exact rules: configuration. Per-process read limits: processes per host.
| Setting | Trade-off |
|---|---|
DYNODB_ |
Default unlimited; cap for memory: each request can buffer up to 16 MiB. |
DYNODB_ |
Default off; phase timings on the same paths. |
GOGC, GOMEMLIMIT |
Go defaults; a larger heap reduces GC frequency. Measure p99, not only CPU. |
Storage engine and disks¶
Use RocksDB (ssd-rocksdb-v1) for new clusters. Redwood (ssd-redwood-1)
remains supported. FoundationDB's
feature status
lists RocksDB as in production in FoundationDB 7.3, supported by the Apple
FoundationDB team. It lists Redwood as in production since 7.1, but with no
maintainer.
Most fleet results on this page and in the
benchmark journal used Redwood. Each section names
its engine; do not read them as RocksDB results. On one 71-host IoT fleet (runs tbf-a6rk2 and tbf-a6rw,
build 1cd06d65, n=1 each), Redwood held 180,000 and 200,000 ops/s where
RocksDB did not hold 180,000, and used 21% to 32% less storage CPU per
operation. RocksDB had the lower p99 at 90,000 ops/s (7.7 ms against 38.4 ms).
See the benchmark journal.
On one host, we compared the disk writes and CPU per write of the two engines
under the 10-GSI write mix (10 KEYS_ONLY GSIs, 900-byte items, 80% updates)
at 4,000 writes/s with single replication. This is the load that one fleet
storage host takes at 8,000 writes/s. Runs engio A1, A2 (Redwood) and B1, B2
(RocksDB), build ef50b4af, FoundationDB 7.3.77, fresh databases, 240 s:
- RocksDB made 0.73 disk write I/Os per write, against 13.33 for Redwood, and wrote 26 KB to disk per write, against 121 KB.
- RocksDB used 2.0 times the storage CPU per write (about 1,110 µs against 560 µs, from the status samples inside the 240 s window).
- The data was on a memory-backed block device, so the I/O counts are block-layer counts, not NVMe IOPS. The Redwood counts matched the NVMe counts of the 6-storage-host fleets.
- At this load, RocksDB used about 4.4 vCPU of storage CPU and Redwood about 2.2 vCPU. An i4i.xlarge storage host has 4 vCPU, so on that host RocksDB would reach the CPU limit before Redwood reaches the disk's write IOPS.
- RocksDB compaction grows with the size of the database, so on a large table its write I/O per write is higher than in these fresh databases.
We did not run this comparison on a fleet. Measure both engines on your workload. Check disk IOPS and latency under your workload; see the multi-process topology guide.
Measure your deployment¶
cmd/crudbench compares fdyno/direct FoundationDB put/get/update/delete.
bash scripts/crudbench.sh # one host, private cluster
OPS="put get update delete" CONC="8 32 128" DUR=20s REPEAT=3 bash scripts/crudbench.sh
The script starts private FoundationDB/fdyno and writes median ops/s and
p50/p99 per point to $OUT/results.jsonl. On your topology, use
cmd/crudbench -target fdyno -endpoint URL or -target raw -cluster-file PATH.
scripts/ttl-drain-bench.sh seeds TTL_ITEMS expired items, runs TTL_HOSTS
sweepers and reports deletes/s.
The benchmark CLI
covers setup, seeding, eventual-read flags and output. Resume at seed_to
only after exit 0. Timed requests are not retried.
Not guaranteed¶
- Keep client CPU below saturation; repeat each point on a fresh cluster without errors/timeouts. Size admission from your results.
- Single-process FoundationDB measures neither replicated commits nor failover.
- Stream final-two-minute maxima are not whole-run lag.
How we know: measurement and fault-check methods.