solid-objects 1.0.7 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/README.md +4 -1
- package/dist/actor.d.ts +2 -2
- package/dist/actor.d.ts.map +1 -1
- package/dist/actor.js +10 -4
- package/dist/actor.js.map +1 -1
- package/dist/cloudflare/engine.d.ts +1 -0
- package/dist/cloudflare/engine.d.ts.map +1 -1
- package/dist/cloudflare/engine.js +38 -9
- package/dist/cloudflare/engine.js.map +1 -1
- package/dist/cloudflare/records.d.ts +5 -1
- package/dist/cloudflare/records.d.ts.map +1 -1
- package/dist/cloudflare/records.js +8 -1
- package/dist/cloudflare/records.js.map +1 -1
- package/dist/cloudflare/runtime.d.ts +1 -1
- package/dist/cloudflare/runtime.d.ts.map +1 -1
- package/dist/cloudflare/runtime.js +4 -1
- package/dist/cloudflare/runtime.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/outcome.d.ts +1 -0
- package/dist/outcome.d.ts.map +1 -1
- package/dist/outcome.js +5 -1
- package/dist/outcome.js.map +1 -1
- package/dist/reconciliation.d.ts +26 -1
- package/dist/reconciliation.d.ts.map +1 -1
- package/dist/reconciliation.js +6 -0
- package/dist/reconciliation.js.map +1 -1
- package/dist/records.d.ts +2 -1
- package/dist/records.d.ts.map +1 -1
- package/dist/reminder-administration.d.ts +1 -1
- package/dist/reminder-administration.d.ts.map +1 -1
- package/dist/repository.d.ts +27 -0
- package/dist/repository.d.ts.map +1 -1
- package/dist/repository.js +66 -18
- package/dist/repository.js.map +1 -1
- package/dist/runtime.d.ts +4 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +94 -9
- package/dist/runtime.js.map +1 -1
- package/dist/schema.d.ts +1 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +132 -2
- package/dist/schema.js.map +1 -1
- package/dist/types.d.ts +4 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/agents.md +10 -0
- package/docs/api.md +133 -8
- package/docs/authorization.md +5 -0
- package/docs/benchmarks-history.md +326 -0
- package/docs/benchmarks.md +197 -313
- package/docs/operations.md +7 -1
- package/docs/parity.md +4 -2
- package/docs/releasing.md +27 -0
- package/package.json +4 -3
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
# Historical benchmark measurements
|
|
2
|
+
|
|
3
|
+
These datasets retain their original runtime versions, machines, database settings and measurement
|
|
4
|
+
boundaries. Use them as records of those environments. The [current benchmark guide](benchmarks.md)
|
|
5
|
+
separately identifies controlled release comparisons and isolated single-version baselines.
|
|
6
|
+
|
|
7
|
+
## Historical shared-workstation 1.0.5 measurements
|
|
8
|
+
|
|
9
|
+
This historical dataset runs the released `v1.0.5` source at commit
|
|
10
|
+
`8975f6e2ad94c114f3638cea8f167956061a9bc3`. The runtime source is unchanged; the measurement harness
|
|
11
|
+
is overlaid from this repository. Every JSON report records that source revision, runtime source and
|
|
12
|
+
built-artifact SHA-256 values, harness SHA-256, the loaded package version, actual driver versions,
|
|
13
|
+
database version, host, and Node version. At collection time, the development branch also reported
|
|
14
|
+
1.0.5 but contained SQLite WAL changes absent from the release tag. Use the recorded source and
|
|
15
|
+
artifact hashes to reproduce the measured 1.0.5 implementation. Version 1.0.6 includes the later
|
|
16
|
+
SQLite WAL changes.
|
|
17
|
+
|
|
18
|
+
The archived reports were collected with harness revision
|
|
19
|
+
`da5fe31b1ffa18eca92ce43fc26bca619d424d6e`. They verified committed operation
|
|
20
|
+
counts. The current collector additionally verifies cart quantities, totals, and
|
|
21
|
+
one pending effect with the correct total for every committed operation, after
|
|
22
|
+
the timed interval. Those additional assertions were not run retrospectively on
|
|
23
|
+
the archived measurements.
|
|
24
|
+
|
|
25
|
+
### Recorded environment and results
|
|
26
|
+
|
|
27
|
+
Measured November 7, 2026 on Apple M2 Ultra, 24 logical CPUs, 64 GiB RAM, darwin 27.2.0, and Node.js
|
|
28
|
+
v24.18.0. Drivers were pg 8.23.0 and mysql2 3.23.3.
|
|
29
|
+
|
|
30
|
+
The workstation was concurrently used for other development tasks. CPU and storage activity were
|
|
31
|
+
shared. Absolute timings and workload comparisons require controlled repeats before capacity
|
|
32
|
+
planning. For example, the three SQLite four-process synchronous hot-counter samples were 17.89,
|
|
33
|
+
20.69, 79.42 operations/second. Every sample is retained.
|
|
34
|
+
|
|
35
|
+
[Complete tables and raw reports](../benchmarks/results/v1.0.5-2026-11-07/README.md)
|
|
36
|
+
include all 216 matrix rows, 12 state-size rows, three idle rows, and 57,600 individual operation
|
|
37
|
+
latencies.
|
|
38
|
+
|
|
39
|
+
| Database | Version | Durability settings |
|
|
40
|
+
| ---------- | ---------------- | ------------------------------------------- |
|
|
41
|
+
| sqlite | 3.53.1 | `journalMode=delete, synchronous=2` |
|
|
42
|
+
| postgresql | 16.15 (Homebrew) | `fsync=on, synchronousCommit=on` |
|
|
43
|
+
| mysql | 26.10.0 | `innodbFlushLogAtTrxCommit=1, syncBinlog=1` |
|
|
44
|
+
|
|
45
|
+
The next table shows synchronous handlers with four worker processes. One-process and
|
|
46
|
+
yielding-handler results are in the complete tables.
|
|
47
|
+
|
|
48
|
+
| Database | Workload | Shape | ops/s | p50 ms | p95 ms | p99 ms |
|
|
49
|
+
| ---------- | ----------- | --------- | -----: | ------: | -------: | -------: |
|
|
50
|
+
| sqlite | counter | warm-hot | 20.69 | 733.52 | 1,595.35 | 1,754.31 |
|
|
51
|
+
| sqlite | counter | warm-many | 13.51 | 818.09 | 3,205.47 | 6,056.1 |
|
|
52
|
+
| sqlite | counter | cold-many | 5.77 | 2,497.5 | 5,538.34 | 6,346.58 |
|
|
53
|
+
| sqlite | cart-outbox | warm-hot | 106.27 | 147.92 | 205.03 | 283.86 |
|
|
54
|
+
| sqlite | cart-outbox | warm-many | 56.87 | 264.62 | 454.1 | 588.05 |
|
|
55
|
+
| sqlite | cart-outbox | cold-many | 35.4 | 393.17 | 1,037.9 | 1,286.45 |
|
|
56
|
+
| postgresql | counter | warm-hot | 88.84 | 160.37 | 275.92 | 293.19 |
|
|
57
|
+
| postgresql | counter | warm-many | 146.88 | 70.92 | 176.45 | 1,103.97 |
|
|
58
|
+
| postgresql | counter | cold-many | 20.25 | 808.09 | 1,069.78 | 1,140.48 |
|
|
59
|
+
| postgresql | cart-outbox | warm-hot | 99.15 | 159.81 | 227.97 | 244.67 |
|
|
60
|
+
| postgresql | cart-outbox | warm-many | 107.12 | 93.49 | 253.75 | 1,307.5 |
|
|
61
|
+
| postgresql | cart-outbox | cold-many | 21.56 | 651.8 | 979.4 | 1,056.95 |
|
|
62
|
+
| mysql | counter | warm-hot | 72.5 | 200.22 | 328.44 | 390.64 |
|
|
63
|
+
| mysql | counter | warm-many | 105.16 | 58.47 | 363.58 | 1,728.53 |
|
|
64
|
+
| mysql | counter | cold-many | 31.69 | 445.1 | 935.43 | 1,060.47 |
|
|
65
|
+
| mysql | cart-outbox | warm-hot | 52.96 | 287.93 | 408.07 | 446.53 |
|
|
66
|
+
| mysql | cart-outbox | warm-many | 74.75 | 134.94 | 549.13 | 1,926.81 |
|
|
67
|
+
| mysql | cart-outbox | cold-many | 20.69 | 720.19 | 1,118.29 | 1,176.44 |
|
|
68
|
+
|
|
69
|
+
State-size results use sequential operations on one actor in a SQLite file:
|
|
70
|
+
|
|
71
|
+
| Payload KiB | Persisted state bytes | ops/s | p50 ms | p95 ms | p99 ms |
|
|
72
|
+
| ----------: | --------------------: | ----: | -----: | -----: | -----: |
|
|
73
|
+
| 0 | 26 | 93.6 | 9.29 | 21.09 | 26.88 |
|
|
74
|
+
| 16 | 16,410 | 86.65 | 10.4 | 21.12 | 26.33 |
|
|
75
|
+
| 128 | 131,098 | 70.4 | 12.86 | 22.93 | 27.15 |
|
|
76
|
+
| 1,024 | 1,048,602 | 42.27 | 22.55 | 33.05 | 42.64 |
|
|
77
|
+
|
|
78
|
+
Idle CPU uses one timed sample per interval, in-memory SQLite, and all four polling roles:
|
|
79
|
+
|
|
80
|
+
| Fast interval ms | Empty polls/s | Process CPU |
|
|
81
|
+
| ---------------: | ------------: | ----------: |
|
|
82
|
+
| 20 | 4 | 0.12% |
|
|
83
|
+
| 100 | 4 | 0.12% |
|
|
84
|
+
| 500 | 4 | 0.1% |
|
|
85
|
+
|
|
86
|
+
### Workloads and measurement boundary
|
|
87
|
+
|
|
88
|
+
The counter matrix includes one hot identity, 100 warm identities, and newly created identities,
|
|
89
|
+
each with synchronous and yielding handlers and one or four processes. A second matrix uses a cart
|
|
90
|
+
with 20 line items. Every cart operation updates a quantity, recalculates the total, and commits one
|
|
91
|
+
outbox effect with the actor state. Effect workers are disabled: the cart results measure durable
|
|
92
|
+
outbox staging, not delivery to an external service. The yielding handler uses `setImmediate()`; it
|
|
93
|
+
does not model external network latency.
|
|
94
|
+
|
|
95
|
+
Each scenario has three separate samples of 250 measured operations after 25 warmup operations, at
|
|
96
|
+
client concurrency 16 and four actor workers. Counters are verified against all submitted operations
|
|
97
|
+
after the timed batch. Tables report the median of each statistic across the three samples.
|
|
98
|
+
Percentiles use nearest rank within each sample; samples are not pooled. The raw JSON retains all
|
|
99
|
+
operation latencies, including slow samples. This short run is a development measurement, not a soak
|
|
100
|
+
test or an application capacity guarantee.
|
|
101
|
+
|
|
102
|
+
The state-size run has three samples of 300 operations after 25 warmups, at concurrency one. It
|
|
103
|
+
verifies final committed count and payload size, records actual serialized state bytes, and retains
|
|
104
|
+
operation latencies. Idle CPU uses three seconds of warmup and ten seconds of measurement per
|
|
105
|
+
polling interval. The historical idle wake-up latency table below has not been rerun as part of this
|
|
106
|
+
dataset.
|
|
107
|
+
|
|
108
|
+
### Reproduce the released runtime
|
|
109
|
+
|
|
110
|
+
Use a separate checkout so later runtime changes cannot enter the result. Install the locked
|
|
111
|
+
dependencies and overlay the measurement harness from the commit containing this dataset before
|
|
112
|
+
building the runtime:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Run from your normal checkout; pin the collector used by the archived reports.
|
|
116
|
+
repository_root=$(pwd)
|
|
117
|
+
harness_ref=da5fe31b1ffa18eca92ce43fc26bca619d424d6e
|
|
118
|
+
# To collect new results with the stronger verifier instead:
|
|
119
|
+
# harness_ref=$(git rev-parse HEAD)
|
|
120
|
+
git worktree add --detach /tmp/solid-objects-v1.0.5 v1.0.5
|
|
121
|
+
git archive "$harness_ref" benchmarks | tar -x -C /tmp/solid-objects-v1.0.5
|
|
122
|
+
cd /tmp/solid-objects-v1.0.5
|
|
123
|
+
pnpm install --frozen-lockfile
|
|
124
|
+
pnpm exec tsc -p tsconfig.build.json
|
|
125
|
+
git diff --exit-code v1.0.5 -- src
|
|
126
|
+
|
|
127
|
+
node benchmarks/run.ts --database sqlite --workload counter \
|
|
128
|
+
--operations 250 --warmup 25 --repetitions 3 > sqlite-counter.json
|
|
129
|
+
node benchmarks/run.ts --database sqlite --workload cart-outbox \
|
|
130
|
+
--operations 250 --warmup 25 --repetitions 3 > sqlite-cart-outbox.json
|
|
131
|
+
node benchmarks/large-state.ts --operations 300 --warmup 25 \
|
|
132
|
+
--repetitions 3 > sqlite-large-state.json
|
|
133
|
+
node benchmarks/idle.ts > sqlite-idle.json
|
|
134
|
+
cd "$repository_root"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Repeat the matrix with `--database postgresql` and `--database mysql` and the benchmark URLs shown
|
|
138
|
+
below, using disposable local databases. Reports contain driver versions and durability settings
|
|
139
|
+
without connection URLs or credentials. Run all scenarios sequentially. Use the recorded host, Node,
|
|
140
|
+
database settings, and driver versions when comparing results; ordinary shared-host activity and
|
|
141
|
+
storage behavior still affect them.
|
|
142
|
+
|
|
143
|
+
Generate the complete tables from the retained reports with:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
node benchmarks/summarize.mjs benchmarks/results/v1.0.5-2026-11-07/*.json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The summarizer rejects mixed runtime/harness provenance, missing scenarios or samples, and missing
|
|
150
|
+
per-operation latencies. Keep the per-sample JSON when reporting a median so the variability remains
|
|
151
|
+
reviewable.
|
|
152
|
+
|
|
153
|
+
The August measurements below retain their original versions, hardware, and methodology.
|
|
154
|
+
|
|
155
|
+
## Idle polling
|
|
156
|
+
|
|
157
|
+
The idle harness measures process CPU and empty database passes for the four runtime roles:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
pnpm run benchmark:idle
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
It warms each interval for three seconds, measures for ten seconds, and reports process user plus
|
|
164
|
+
system CPU time divided by wall time.
|
|
165
|
+
|
|
166
|
+
Measured on August 16, 2026 on an Apple M5 with Node.js 26.7.0 and in-memory SQLite. The before run
|
|
167
|
+
used 0.13.0; the after run used the prepared 0.13.1 tree. Each run started one actor, effect,
|
|
168
|
+
reminder, and broadcast role.
|
|
169
|
+
|
|
170
|
+
| Fast interval | Before polls/s | Before CPU | After polls/s | After CPU |
|
|
171
|
+
| ------------: | -------------: | ---------: | ------------: | --------: |
|
|
172
|
+
| 20 ms | 188.78 | 3.254% | 4.000 | 0.129% |
|
|
173
|
+
| 100 ms | 39.596 | 0.906% | 3.999 | 0.121% |
|
|
174
|
+
| 500 ms | 7.999 | 0.251% | 3.999 | 0.104% |
|
|
175
|
+
|
|
176
|
+
The after run reached the one-second ceiling for all four roles. These are developer-laptop
|
|
177
|
+
measurements, not a CPU guarantee; timer scheduling, JIT, database path, and unrelated host activity
|
|
178
|
+
affect short samples.
|
|
179
|
+
|
|
180
|
+
Five SQLite samples measured durable enqueue through committed completion after 2.5 seconds of
|
|
181
|
+
idleness. The polling-only multi-process harness submits just after an empty pass, so it measures
|
|
182
|
+
approximately the full polling wait rather than average arrival latency.
|
|
183
|
+
|
|
184
|
+
| Topology | 0.13.0 p50 | Prepared 0.13.1 p50 |
|
|
185
|
+
| ------------------------------- | ---------: | ------------------: |
|
|
186
|
+
| One process, in-process wake-up | 2.589 ms | 2.662 ms |
|
|
187
|
+
| Two processes, polling only | 107.945 ms | 1,006.232 ms |
|
|
188
|
+
|
|
189
|
+
The local wake-up keeps the one-process path prompt after backoff. The polling-only row is the
|
|
190
|
+
explicit tradeoff: use PostgreSQL notifications or optional Redis Pub/Sub when separate processes
|
|
191
|
+
need low-latency delivery.
|
|
192
|
+
|
|
193
|
+
## Large state
|
|
194
|
+
|
|
195
|
+
The large-state harness measures how the committed state size changes throughput. It runs one actor
|
|
196
|
+
and one `increment()` operation with sequential turns, so each row isolates the per-turn
|
|
197
|
+
serialization and row write:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
pnpm run benchmark:large-state
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Use `--sizes`, `--operations`, and `--warmup` to change the recorded dataset.
|
|
204
|
+
|
|
205
|
+
Measured on August 29, 2026 on an Apple M5, macOS 26.6, Node.js 24.18.0, and SQLite 3.53.1 through
|
|
206
|
+
`node:sqlite` on a temporary file. Each row is the median of three runs of 300 measured operations.
|
|
207
|
+
The before column used the `0.14.3` tree; the after column used the `0.14.4` tree, which removes the
|
|
208
|
+
redundant per-turn state serialization.
|
|
209
|
+
|
|
210
|
+
| Persisted state | Before ms/op | Before ops/s | After ms/op | After ops/s | Gain |
|
|
211
|
+
| --------------: | -----------: | -----------: | ----------: | ----------: | ---: |
|
|
212
|
+
| 0 KB | 1.85 | 540 | 1.60 | 625 | 1.2x |
|
|
213
|
+
| 16 KB | 2.12 | 472 | 1.64 | 611 | 1.3x |
|
|
214
|
+
| 128 KB | 4.01 | 250 | 2.53 | 395 | 1.6x |
|
|
215
|
+
| 1 MB | 19.11 | 52 | 9.32 | 107 | 2.1x |
|
|
216
|
+
|
|
217
|
+
The before tree traversed the whole state eight times for each committed operation, and nine times
|
|
218
|
+
for a query. The after tree traverses it four times: one image for rollback and comparison, one
|
|
219
|
+
committed image, and one read for each of the two observables guards. The remaining cost at 1 MB is
|
|
220
|
+
the database write of a large row, which the whole-image commit model cannot avoid.
|
|
221
|
+
|
|
222
|
+
The curve, not the ratio, is the operating instruction. Throughput falls by about 6x between 0 KB
|
|
223
|
+
and 1 MB even after the change. Keep one actor's state small. See
|
|
224
|
+
[State size and throughput](state-and-lifecycle.md#state-size-and-throughput).
|
|
225
|
+
|
|
226
|
+
## Historical August 0.14.0 matrix
|
|
227
|
+
|
|
228
|
+
Measured on August 22, 2026 with the `0.14.0` source tree:
|
|
229
|
+
|
|
230
|
+
- Apple M5 (Mac17,2), 10 logical CPUs
|
|
231
|
+
- macOS 26.6
|
|
232
|
+
- Node.js 24.18.0
|
|
233
|
+
- SQLite 3.53.1 through `node:sqlite` on the internal SSD
|
|
234
|
+
- PostgreSQL 17.11 and MySQL 9.7.1, both installed natively and started on a scoped temporary data
|
|
235
|
+
directory
|
|
236
|
+
- 25 warmup operations, 250 measured operations, concurrency 16
|
|
237
|
+
|
|
238
|
+
### SQLite 3.53.1
|
|
239
|
+
|
|
240
|
+
| Topology | Shape | Handler | ops/s | p50 ms | p95 ms | p99 ms |
|
|
241
|
+
| -------------- | --------- | ------------ | -----: | -----: | -----: | -----: |
|
|
242
|
+
| one process | warm hot | synchronous | 286.09 | 50.09 | 135.15 | 176.55 |
|
|
243
|
+
| one process | warm hot | asynchronous | 322.53 | 48.66 | 70.59 | 75.87 |
|
|
244
|
+
| one process | warm many | synchronous | 119.05 | 132.25 | 237.52 | 247.05 |
|
|
245
|
+
| one process | warm many | asynchronous | 288.26 | 32.64 | 70.33 | 562.42 |
|
|
246
|
+
| one process | cold many | synchronous | 47.67 | 326.04 | 435.46 | 507.03 |
|
|
247
|
+
| one process | cold many | asynchronous | 99.39 | 148 | 236.03 | 295.26 |
|
|
248
|
+
| four processes | warm hot | synchronous | 518.66 | 30.15 | 52.73 | 78.57 |
|
|
249
|
+
| four processes | warm hot | asynchronous | 506.8 | 26.39 | 92.26 | 102.18 |
|
|
250
|
+
| four processes | warm many | synchronous | 190.36 | 76.65 | 145.7 | 158.94 |
|
|
251
|
+
| four processes | warm many | asynchronous | 77.12 | 194.6 | 399.43 | 527.1 |
|
|
252
|
+
| four processes | cold many | synchronous | 54.74 | 273.33 | 646.68 | 650.09 |
|
|
253
|
+
| four processes | cold many | asynchronous | 93.85 | 145.27 | 333.78 | 426.6 |
|
|
254
|
+
|
|
255
|
+
### PostgreSQL 17.11
|
|
256
|
+
|
|
257
|
+
| Topology | Shape | Handler | ops/s | p50 ms | p95 ms | p99 ms |
|
|
258
|
+
| -------------- | --------- | ------------ | -----: | -----: | -----: | ------: |
|
|
259
|
+
| one process | warm hot | synchronous | 206.31 | 69.33 | 132.69 | 153.03 |
|
|
260
|
+
| one process | warm hot | asynchronous | 212.07 | 72.38 | 96.75 | 106.12 |
|
|
261
|
+
| one process | warm many | synchronous | 191.4 | 55.71 | 147.99 | 722.6 |
|
|
262
|
+
| one process | warm many | asynchronous | 66.6 | 121.61 | 920.97 | 2441.28 |
|
|
263
|
+
| one process | cold many | synchronous | 31.38 | 500.73 | 705.15 | 722.54 |
|
|
264
|
+
| one process | cold many | asynchronous | 17.24 | 909.02 | 1192.9 | 1211.35 |
|
|
265
|
+
| four processes | warm hot | synchronous | 265.63 | 57.94 | 82.52 | 109.46 |
|
|
266
|
+
| four processes | warm hot | asynchronous | 330.94 | 46.81 | 63.76 | 70.25 |
|
|
267
|
+
| four processes | warm many | synchronous | 161.73 | 58.67 | 237.04 | 718.55 |
|
|
268
|
+
| four processes | warm many | asynchronous | 119.63 | 68.71 | 531.12 | 1372.5 |
|
|
269
|
+
| four processes | cold many | synchronous | 50.84 | 314.51 | 487.09 | 506.45 |
|
|
270
|
+
| four processes | cold many | asynchronous | 29.93 | 546.7 | 615.36 | 638.1 |
|
|
271
|
+
|
|
272
|
+
### MySQL 9.7.1
|
|
273
|
+
|
|
274
|
+
| Topology | Shape | Handler | ops/s | p50 ms | p95 ms | p99 ms |
|
|
275
|
+
| -------------- | --------- | ------------ | -----: | ------: | ------: | ------: |
|
|
276
|
+
| one process | warm hot | synchronous | 79.59 | 208.66 | 222.86 | 225.19 |
|
|
277
|
+
| one process | warm hot | asynchronous | 79.98 | 206.78 | 232.74 | 237.94 |
|
|
278
|
+
| one process | warm many | synchronous | 79.7 | 129.25 | 395.52 | 1987.46 |
|
|
279
|
+
| one process | warm many | asynchronous | 28.06 | 338.85 | 1992.54 | 6004.98 |
|
|
280
|
+
| one process | cold many | synchronous | 13.78 | 1215.91 | 1445.61 | 1470.91 |
|
|
281
|
+
| one process | cold many | asynchronous | 11.63 | 1347.74 | 1733.01 | 1820.26 |
|
|
282
|
+
| four processes | warm hot | synchronous | 213.75 | 72.85 | 94.48 | 106.73 |
|
|
283
|
+
| four processes | warm hot | asynchronous | 228.32 | 70.45 | 84.96 | 90.39 |
|
|
284
|
+
| four processes | warm many | synchronous | 105.31 | 90.36 | 297.88 | 1064.14 |
|
|
285
|
+
| four processes | warm many | asynchronous | 80.03 | 149.92 | 324.98 | 1090.95 |
|
|
286
|
+
| four processes | cold many | synchronous | 51.82 | 306.1 | 407.22 | 424.45 |
|
|
287
|
+
| four processes | cold many | asynchronous | 27.35 | 554.03 | 807.18 | 868.48 |
|
|
288
|
+
|
|
289
|
+
The cold and asynchronous cases keep the poorest throughput and the longest tail. These are observed
|
|
290
|
+
limitations. They are not capacity recommendations. Repeat the runs on application-shaped payloads
|
|
291
|
+
before you draw a general conclusion. Integration tests cover PostgreSQL 14, MySQL 8.0, and other
|
|
292
|
+
database versions, but this harness did not measure them.
|
|
293
|
+
|
|
294
|
+
### Virtualization cost
|
|
295
|
+
|
|
296
|
+
In the August experiment, the same server version ran natively and in Docker Desktop on the same machine, on the same day,
|
|
297
|
+
through the same harness. Only the container boundary changes.
|
|
298
|
+
|
|
299
|
+
| Database | Topology and shape | Native ops/s | Docker ops/s | Native gain |
|
|
300
|
+
| ---------------- | ------------------------------- | -----------: | -----------: | ----------: |
|
|
301
|
+
| PostgreSQL 17.11 | four processes, warm hot, async | 330.94 | 67.69 | 4.9x |
|
|
302
|
+
| PostgreSQL 17.11 | one process, warm hot, sync | 206.31 | 56.44 | 3.7x |
|
|
303
|
+
| MySQL 9.7.1 | four processes, warm hot, async | 228.32 | 60.27 | 3.8x |
|
|
304
|
+
| MySQL 9.7.1 | one process, warm hot, sync | 79.59 | 44.56 | 1.8x |
|
|
305
|
+
|
|
306
|
+
Across the full matrix, Docker Desktop cost between 1.0x and 7.8x of the native throughput. The
|
|
307
|
+
multi-process rows lose the most, because more connections and more commits cross the container
|
|
308
|
+
boundary. Measure a database on the deployment shape you intend to run, and state the boundary with
|
|
309
|
+
any number you publish.
|
|
310
|
+
|
|
311
|
+
Earlier releases of this document reported PostgreSQL 18.4 and MySQL 8.4.11 in Docker Desktop on the
|
|
312
|
+
`0.13.0` tree. Those numbers measured the container as much as the database, so the tables above
|
|
313
|
+
replace them.
|
|
314
|
+
|
|
315
|
+
## Sources of bias
|
|
316
|
+
|
|
317
|
+
- A developer laptop shares CPU, memory, and storage with unrelated processes.
|
|
318
|
+
- Loopback database connections exclude production network latency.
|
|
319
|
+
- Filesystem cache, SQLite WAL state, Node JIT warmup, and garbage collection affect short runs.
|
|
320
|
+
- The August Docker Desktop experiment measured 1.0x to 7.8x lower throughput than native
|
|
321
|
+
servers. That is not a prediction for Docker on a Linux runner. See [Virtualization cost](#virtualization-cost).
|
|
322
|
+
- The payload is a small counter, not a representative application state size. See
|
|
323
|
+
[Large state](#large-state) for the measured effect of state size.
|
|
324
|
+
- Historical baselines use default durability and client concurrency 16. Comparisons must state
|
|
325
|
+
each tested concurrency and actual durability setting.
|
|
326
|
+
- Hot-identity results deliberately include serialization and cannot be scaled by adding workers.
|