chadtmiller.com/monolith
An atproto PDS
0
0
The benchmark measures storage; the soak and its results are bench/soak
bench/soak/data/at-rest/events-reference.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/at-rest/events-spec-pds.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/at-rest/summary-reference.jsonnew+44−0
| @@ -0,0 +1,44 @@ | ||
{ | ||
"side": "reference", | ||
"updated": "2026-11-13T17:54:05.517Z", | ||
"started": "2026-11-13T17:43:55.821Z", | ||
"accounts": 20, | ||
"records": 3312, | ||
"lastSeq": 3411, | ||
"totals": { | ||
"ops": 6178, | ||
"ok": 6178, | ||
"e5xx": 0, | ||
"e4xx": 0, | ||
"limited": 0, | ||
"down": 0, | ||
"mismatches": 0, | ||
"lost": 0, | ||
"found": 0, | ||
"seqJumps": 0, | ||
"missingCommits": 0, | ||
"outages": 0, | ||
"outageMs": 0, | ||
"verifies": 9 | ||
}, | ||
"lastWindow": { | ||
"from": "2026-11-13T17:54:05.453Z", | ||
"to": "2026-11-13T17:54:05.517Z", | ||
"ops": { | ||
"post": { | ||
"n": 1, | ||
"p50": 61.9, | ||
"p99": 61.9, | ||
"outcomes": { | ||
"ok": 1 | ||
} | ||
} | ||
}, | ||
"firehose": { | ||
"events": 3, | ||
"lagP50": 178, | ||
"lagP99": 276 | ||
}, | ||
"lastSeq": 3411 | ||
} | ||
} | ||
| \ No newline at end of file | ||
bench/soak/data/at-rest/summary-spec-pds.jsonnew+44−0
| @@ -0,0 +1,44 @@ | ||
{ | ||
"side": "spec-pds", | ||
"updated": "2026-11-13T17:54:02.772Z", | ||
"started": "2026-11-13T17:43:55.394Z", | ||
"accounts": 20, | ||
"records": 3338, | ||
"lastSeq": 3413, | ||
"totals": { | ||
"ops": 6209, | ||
"ok": 6209, | ||
"e5xx": 0, | ||
"e4xx": 0, | ||
"limited": 0, | ||
"down": 0, | ||
"mismatches": 0, | ||
"lost": 0, | ||
"found": 0, | ||
"seqJumps": 0, | ||
"missingCommits": 0, | ||
"outages": 0, | ||
"outageMs": 0, | ||
"verifies": 9 | ||
}, | ||
"lastWindow": { | ||
"from": "2026-11-13T17:54:02.769Z", | ||
"to": "2026-11-13T17:54:02.771Z", | ||
"ops": { | ||
"getRecord": { | ||
"n": 1, | ||
"p50": 8.9, | ||
"p99": 8.9, | ||
"outcomes": { | ||
"ok": 1 | ||
} | ||
} | ||
}, | ||
"firehose": { | ||
"events": 0, | ||
"lagP50": null, | ||
"lagP99": null | ||
}, | ||
"lastSeq": 3413 | ||
} | ||
} | ||
| \ No newline at end of file | ||
bench/soak/data/day-local-disk/events-reference.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/day-local-disk/events-spec-pds.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/day-local-disk/kills.jsonlnew+1−0
| @@ -0,0 +1 @@ | ||
{"time":"2026-11-13T17:54:56Z","killed":"spec-pds-pds-1","pid":2053815,"restarted":0.6} | ||
bench/soak/data/day-local-disk/samples.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/day-local-disk/summary-reference.jsonnew+164−0
| @@ -0,0 +1,164 @@ | ||
{ | ||
"side": "reference", | ||
"updated": "2026-11-13T18:37:44.377Z", | ||
"started": "2026-11-13T17:01:54.588Z", | ||
"accounts": 50, | ||
"records": 133136, | ||
"lastSeq": 137599, | ||
"totals": { | ||
"ops": 38854, | ||
"ok": 38473, | ||
"e5xx": 0, | ||
"e4xx": 0, | ||
"limited": 381, | ||
"down": 0, | ||
"mismatches": 0, | ||
"lost": 0, | ||
"found": 0, | ||
"seqJumps": 0, | ||
"missingCommits": 0, | ||
"outages": 0, | ||
"outageMs": 0, | ||
"verifies": 94 | ||
}, | ||
"lastWindow": { | ||
"from": "2026-11-13T18:32:44.372Z", | ||
"to": "2026-11-13T18:37:44.372Z", | ||
"ops": { | ||
"getRecord": { | ||
"n": 256, | ||
"p50": 12.2, | ||
"p99": 357.8, | ||
"outcomes": { | ||
"ok": 256 | ||
} | ||
}, | ||
"profile": { | ||
"n": 67, | ||
"p50": 76.3, | ||
"p99": 1648.1, | ||
"outcomes": { | ||
"ok": 67 | ||
} | ||
}, | ||
"describeServer": { | ||
"n": 157, | ||
"p50": 3.4, | ||
"p99": 305.1, | ||
"outcomes": { | ||
"ok": 157 | ||
} | ||
}, | ||
"post": { | ||
"n": 485, | ||
"p50": 73.2, | ||
"p99": 1314.1, | ||
"outcomes": { | ||
"ok": 485 | ||
} | ||
}, | ||
"delete": { | ||
"n": 111, | ||
"p50": 75.4, | ||
"p99": 995.1, | ||
"outcomes": { | ||
"ok": 111 | ||
} | ||
}, | ||
"listRecords": { | ||
"n": 165, | ||
"p50": 22.8, | ||
"p99": 908.7, | ||
"outcomes": { | ||
"ok": 165 | ||
} | ||
}, | ||
"getRepo": { | ||
"n": 24, | ||
"p50": 322.5, | ||
"p99": 1134.1, | ||
"outcomes": { | ||
"ok": 24 | ||
} | ||
}, | ||
"like": { | ||
"n": 221, | ||
"p50": 75.3, | ||
"p99": 610.9, | ||
"outcomes": { | ||
"ok": 221 | ||
} | ||
}, | ||
"follow": { | ||
"n": 67, | ||
"p50": 93.3, | ||
"p99": 778, | ||
"outcomes": { | ||
"ok": 67 | ||
} | ||
}, | ||
"listRecords(verify)": { | ||
"n": 162, | ||
"p50": 23.7, | ||
"p99": 241.4, | ||
"outcomes": { | ||
"ok": 162 | ||
} | ||
}, | ||
"refreshSession": { | ||
"n": 12, | ||
"p50": 7.2, | ||
"p99": 793.6, | ||
"outcomes": { | ||
"ok": 12 | ||
} | ||
}, | ||
"verify": { | ||
"n": 5, | ||
"p50": null, | ||
"p99": null, | ||
"outcomes": { | ||
"ok": 5 | ||
} | ||
}, | ||
"uploadBlob": { | ||
"n": 26, | ||
"p50": 8.4, | ||
"p99": 197.5, | ||
"outcomes": { | ||
"429": 26 | ||
} | ||
}, | ||
"applyWrites": { | ||
"n": 72, | ||
"p50": 92.7, | ||
"p99": 635.7, | ||
"outcomes": { | ||
"ok": 72 | ||
} | ||
}, | ||
"describeRepo": { | ||
"n": 45, | ||
"p50": 11.5, | ||
"p99": 504, | ||
"outcomes": { | ||
"ok": 45 | ||
} | ||
}, | ||
"getLatestCommit": { | ||
"n": 86, | ||
"p50": 11, | ||
"p99": 435.2, | ||
"outcomes": { | ||
"ok": 86 | ||
} | ||
} | ||
}, | ||
"firehose": { | ||
"events": 1023, | ||
"lagP50": 3, | ||
"lagP99": 449 | ||
}, | ||
"lastSeq": 137599 | ||
} | ||
} | ||
| \ No newline at end of file | ||
bench/soak/data/day-local-disk/summary-spec-pds.jsonnew+172−0
| @@ -0,0 +1,172 @@ | ||
{ | ||
"side": "spec-pds", | ||
"updated": "2026-11-13T18:37:19.433Z", | ||
"started": "2026-11-13T17:01:54.588Z", | ||
"accounts": 50, | ||
"records": 133930, | ||
"lastSeq": 146729, | ||
"totals": { | ||
"ops": 39279, | ||
"ok": 38978, | ||
"e5xx": 0, | ||
"e4xx": 0, | ||
"limited": 300, | ||
"down": 1, | ||
"mismatches": 53, | ||
"lost": 0, | ||
"found": 0, | ||
"seqJumps": 3, | ||
"missingCommits": 0, | ||
"outages": 1, | ||
"outageMs": 3466, | ||
"verifies": 93 | ||
}, | ||
"lastWindow": { | ||
"from": "2026-11-13T18:32:19.437Z", | ||
"to": "2026-11-13T18:37:19.432Z", | ||
"ops": { | ||
"like": { | ||
"n": 231, | ||
"p50": 12.7, | ||
"p99": 227.9, | ||
"outcomes": { | ||
"ok": 231 | ||
} | ||
}, | ||
"post": { | ||
"n": 463, | ||
"p50": 7.1, | ||
"p99": 195.7, | ||
"outcomes": { | ||
"ok": 463 | ||
} | ||
}, | ||
"delete": { | ||
"n": 87, | ||
"p50": 8.8, | ||
"p99": 303.4, | ||
"outcomes": { | ||
"ok": 87 | ||
} | ||
}, | ||
"getRecord": { | ||
"n": 269, | ||
"p50": 2.6, | ||
"p99": 202.2, | ||
"outcomes": { | ||
"ok": 269 | ||
} | ||
}, | ||
"describeServer": { | ||
"n": 176, | ||
"p50": 2, | ||
"p99": 319.6, | ||
"outcomes": { | ||
"ok": 176 | ||
} | ||
}, | ||
"listRecords": { | ||
"n": 171, | ||
"p50": 3.9, | ||
"p99": 297.5, | ||
"outcomes": { | ||
"ok": 171 | ||
} | ||
}, | ||
"getLatestCommit": { | ||
"n": 79, | ||
"p50": 2.1, | ||
"p99": 407.1, | ||
"outcomes": { | ||
"ok": 79 | ||
} | ||
}, | ||
"listRecords(verify)": { | ||
"n": 163, | ||
"p50": 5, | ||
"p99": 408.5, | ||
"outcomes": { | ||
"ok": 163 | ||
} | ||
}, | ||
"verify": { | ||
"n": 5, | ||
"p50": null, | ||
"p99": null, | ||
"outcomes": { | ||
"ok": 5 | ||
} | ||
}, | ||
"follow": { | ||
"n": 70, | ||
"p50": 8.9, | ||
"p99": 100.1, | ||
"outcomes": { | ||
"ok": 70 | ||
} | ||
}, | ||
"getRepo": { | ||
"n": 22, | ||
"p50": 47.2, | ||
"p99": 90.3, | ||
"outcomes": { | ||
"ok": 22 | ||
} | ||
}, | ||
"applyWrites": { | ||
"n": 71, | ||
"p50": 11.3, | ||
"p99": 595.4, | ||
"outcomes": { | ||
"ok": 71 | ||
} | ||
}, | ||
"profile": { | ||
"n": 53, | ||
"p50": 6.8, | ||
"p99": 505.2, | ||
"outcomes": { | ||
"ok": 53 | ||
} | ||
}, | ||
"uploadBlob": { | ||
"n": 34, | ||
"p50": 5.6, | ||
"p99": 286, | ||
"outcomes": { | ||
"ok": 34 | ||
} | ||
}, | ||
"blobPost": { | ||
"n": 34, | ||
"p50": 11.8, | ||
"p99": 99.6, | ||
"outcomes": { | ||
"ok": 34 | ||
} | ||
}, | ||
"describeRepo": { | ||
"n": 45, | ||
"p50": 3.3, | ||
"p99": 25.6, | ||
"outcomes": { | ||
"ok": 45 | ||
} | ||
}, | ||
"refreshSession": { | ||
"n": 24, | ||
"p50": 3.6, | ||
"p99": 5, | ||
"outcomes": { | ||
"ok": 24 | ||
} | ||
} | ||
}, | ||
"firehose": { | ||
"events": 1009, | ||
"lagP50": 1, | ||
"lagP99": 5 | ||
}, | ||
"lastSeq": 146729 | ||
} | ||
} | ||
| \ No newline at end of file | ||
bench/soak/data/night1/events-reference.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/night1/events-spec-pds.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/night1/kills.jsonlnew+8−0
| @@ -0,0 +1,8 @@ | ||
{"time":"2026-11-13T07:59:38Z","killed":"spec-pds-pds-1","pid":1714108,"restarted":0.7} | ||
{"time":"2026-11-13T08:53:37Z","killed":"opensocial-next-pds-1","pid":1710534,"restarted":0.6} | ||
{"time":"2026-11-13T10:00:02Z","killed":"spec-pds-pds-1","pid":1747819,"restarted":0.8} | ||
{"time":"2026-11-13T11:07:29Z","killed":"opensocial-next-pds-1","pid":1777945,"restarted":0.6} | ||
{"time":"2026-11-13T12:14:57Z","killed":"spec-pds-pds-1","pid":1814554,"restarted":0.8} | ||
{"time":"2026-11-13T13:15:08Z","killed":"opensocial-next-pds-1","pid":1851839,"restarted":0.9} | ||
{"time":"2026-11-13T14:05:00Z","killed":"spec-pds-pds-1","pid":1889103,"restarted":0.8} | ||
{"time":"2026-11-13T15:00:03Z","killed":"opensocial-next-pds-1","pid":1923288,"restarted":0.9} | ||
bench/soak/data/night1/samples.jsonl.gznew+0−0
A binary file, not shown.
bench/soak/data/night1/summary-reference.jsonnew+173−0
| @@ -0,0 +1,173 @@ | ||
{ | ||
"side": "reference", | ||
"updated": "2026-11-13T16:13:57.494Z", | ||
"started": "2026-11-13T07:08:46.689Z", | ||
"accounts": 50, | ||
"records": 109868, | ||
"lastSeq": 112286, | ||
"totals": { | ||
"ops": 209710, | ||
"ok": 209315, | ||
"e5xx": 0, | ||
"e4xx": 200, | ||
"limited": 0, | ||
"down": 195, | ||
"mismatches": 200, | ||
"lost": 4510, | ||
"found": 1, | ||
"seqJumps": 0, | ||
"missingCommits": 0, | ||
"outages": 4, | ||
"outageMs": 31098, | ||
"verifies": 544 | ||
}, | ||
"lastWindow": { | ||
"from": "2026-11-13T16:08:57.493Z", | ||
"to": "2026-11-13T16:13:57.491Z", | ||
"ops": { | ||
"like": { | ||
"n": 225, | ||
"p50": 75.6, | ||
"p99": 763.4, | ||
"outcomes": { | ||
"ok": 225 | ||
} | ||
}, | ||
"post": { | ||
"n": 470, | ||
"p50": 74, | ||
"p99": 788.7, | ||
"outcomes": { | ||
"ok": 470 | ||
} | ||
}, | ||
"follow": { | ||
"n": 76, | ||
"p50": 86.7, | ||
"p99": 320.5, | ||
"outcomes": { | ||
"ok": 76 | ||
} | ||
}, | ||
"getRecord": { | ||
"n": 268, | ||
"p50": 12.4, | ||
"p99": 398.3, | ||
"outcomes": { | ||
"400": 3, | ||
"ok": 265 | ||
} | ||
}, | ||
"applyWrites": { | ||
"n": 71, | ||
"p50": 92.7, | ||
"p99": 1113.6, | ||
"outcomes": { | ||
"ok": 71 | ||
} | ||
}, | ||
"profile": { | ||
"n": 48, | ||
"p50": 70.3, | ||
"p99": 489.7, | ||
"outcomes": { | ||
"ok": 48 | ||
} | ||
}, | ||
"listRecords": { | ||
"n": 174, | ||
"p50": 20.4, | ||
"p99": 403.7, | ||
"outcomes": { | ||
"ok": 174 | ||
} | ||
}, | ||
"describeServer": { | ||
"n": 170, | ||
"p50": 3.4, | ||
"p99": 245.9, | ||
"outcomes": { | ||
"ok": 170 | ||
} | ||
}, | ||
"getRepo": { | ||
"n": 21, | ||
"p50": 202.4, | ||
"p99": 1913.7, | ||
"outcomes": { | ||
"ok": 21 | ||
} | ||
}, | ||
"delete": { | ||
"n": 99, | ||
"p50": 75.8, | ||
"p99": 694.5, | ||
"outcomes": { | ||
"ok": 99 | ||
} | ||
}, | ||
"getLatestCommit": { | ||
"n": 83, | ||
"p50": 11.6, | ||
"p99": 444.9, | ||
"outcomes": { | ||
"ok": 83 | ||
} | ||
}, | ||
"uploadBlob": { | ||
"n": 36, | ||
"p50": 34.8, | ||
"p99": 612.2, | ||
"outcomes": { | ||
"ok": 36 | ||
} | ||
}, | ||
"blobPost": { | ||
"n": 36, | ||
"p50": 99.4, | ||
"p99": 905.4, | ||
"outcomes": { | ||
"ok": 36 | ||
} | ||
}, | ||
"refreshSession": { | ||
"n": 21, | ||
"p50": 6.8, | ||
"p99": 38.5, | ||
"outcomes": { | ||
"ok": 21 | ||
} | ||
}, | ||
"describeRepo": { | ||
"n": 34, | ||
"p50": 13, | ||
"p99": 102.7, | ||
"outcomes": { | ||
"ok": 34 | ||
} | ||
}, | ||
"listRecords(verify)": { | ||
"n": 141, | ||
"p50": 23, | ||
"p99": 305.8, | ||
"outcomes": { | ||
"ok": 141 | ||
} | ||
}, | ||
"verify": { | ||
"n": 5, | ||
"p50": null, | ||
"p99": null, | ||
"outcomes": { | ||
"bad": 5 | ||
} | ||
} | ||
}, | ||
"firehose": { | ||
"events": 1024, | ||
"lagP50": 3, | ||
"lagP99": 694 | ||
}, | ||
"lastSeq": 112286 | ||
} | ||
} | ||
| \ No newline at end of file | ||
bench/soak/data/night1/summary-spec-pds.jsonnew+172−0
| @@ -0,0 +1,172 @@ | ||
{ | ||
"side": "spec-pds", | ||
"updated": "2026-11-13T16:13:52.687Z", | ||
"started": "2026-11-13T07:08:46.689Z", | ||
"accounts": 50, | ||
"records": 110175, | ||
"lastSeq": 117005, | ||
"totals": { | ||
"ops": 209823, | ||
"ok": 209607, | ||
"e5xx": 0, | ||
"e4xx": 213, | ||
"limited": 0, | ||
"down": 3, | ||
"mismatches": 213, | ||
"lost": 4660, | ||
"found": 0, | ||
"seqJumps": 5, | ||
"missingCommits": 0, | ||
"outages": 3, | ||
"outageMs": 9357, | ||
"verifies": 544 | ||
}, | ||
"lastWindow": { | ||
"from": "2026-11-13T16:08:52.683Z", | ||
"to": "2026-11-13T16:13:52.685Z", | ||
"ops": { | ||
"getRecord": { | ||
"n": 262, | ||
"p50": 2.7, | ||
"p99": 216.9, | ||
"outcomes": { | ||
"ok": 262 | ||
} | ||
}, | ||
"post": { | ||
"n": 437, | ||
"p50": 11, | ||
"p99": 214.7, | ||
"outcomes": { | ||
"ok": 437 | ||
} | ||
}, | ||
"follow": { | ||
"n": 78, | ||
"p50": 12.5, | ||
"p99": 708.1, | ||
"outcomes": { | ||
"ok": 78 | ||
} | ||
}, | ||
"profile": { | ||
"n": 52, | ||
"p50": 10.7, | ||
"p99": 299.4, | ||
"outcomes": { | ||
"ok": 52 | ||
} | ||
}, | ||
"listRecords": { | ||
"n": 183, | ||
"p50": 4.4, | ||
"p99": 320.4, | ||
"outcomes": { | ||
"ok": 183 | ||
} | ||
}, | ||
"like": { | ||
"n": 206, | ||
"p50": 15.9, | ||
"p99": 327.5, | ||
"outcomes": { | ||
"ok": 206 | ||
} | ||
}, | ||
"describeServer": { | ||
"n": 191, | ||
"p50": 2.1, | ||
"p99": 16.6, | ||
"outcomes": { | ||
"ok": 191 | ||
} | ||
}, | ||
"describeRepo": { | ||
"n": 37, | ||
"p50": 2.9, | ||
"p99": 35.1, | ||
"outcomes": { | ||
"ok": 37 | ||
} | ||
}, | ||
"getLatestCommit": { | ||
"n": 97, | ||
"p50": 2.2, | ||
"p99": 716.9, | ||
"outcomes": { | ||
"ok": 97 | ||
} | ||
}, | ||
"applyWrites": { | ||
"n": 70, | ||
"p50": 16, | ||
"p99": 519.7, | ||
"outcomes": { | ||
"ok": 70 | ||
} | ||
}, | ||
"delete": { | ||
"n": 105, | ||
"p50": 12.5, | ||
"p99": 330.2, | ||
"outcomes": { | ||
"ok": 105 | ||
} | ||
}, | ||
"uploadBlob": { | ||
"n": 44, | ||
"p50": 6, | ||
"p99": 266.4, | ||
"outcomes": { | ||
"ok": 44 | ||
} | ||
}, | ||
"blobPost": { | ||
"n": 44, | ||
"p50": 26.7, | ||
"p99": 401.4, | ||
"outcomes": { | ||
"ok": 44 | ||
} | ||
}, | ||
"refreshSession": { | ||
"n": 18, | ||
"p50": 6.4, | ||
"p99": 42.9, | ||
"outcomes": { | ||
"ok": 18 | ||
} | ||
}, | ||
"listRecords(verify)": { | ||
"n": 142, | ||
"p50": 5.1, | ||
"p99": 192.8, | ||
"outcomes": { | ||
"ok": 142 | ||
} | ||
}, | ||
"verify": { | ||
"n": 5, | ||
"p50": null, | ||
"p99": null, | ||
"outcomes": { | ||
"bad": 5 | ||
} | ||
}, | ||
"getRepo": { | ||
"n": 15, | ||
"p50": 29.6, | ||
"p99": 154.1, | ||
"outcomes": { | ||
"ok": 15 | ||
} | ||
} | ||
}, | ||
"firehose": { | ||
"events": 992, | ||
"lagP50": 0, | ||
"lagP99": 3 | ||
}, | ||
"lastSeq": 117005 | ||
} | ||
} | ||
| \ No newline at end of file | ||
bench/soak/README.mdnew+84−0
| @@ -0,0 +1,84 @@ | ||
# The soak | ||
| ||
`soak.mjs` runs one PDS, or several side by side, under a steady mixed load | ||
for as long as it is left, and checks as it goes that nothing answered is | ||
lost. Where the benchmark (`../README.md`) measures short, fresh rounds, the | ||
soak is for what only hours show: memory over time, the data directory's | ||
growth, what a crash in the middle of it costs, and whether every write still | ||
reads back. It needs Node, the version `.node-version` names, and nothing | ||
else. | ||
| ||
## What it does | ||
| ||
Each server gets `ACCOUNTS` accounts (with an invite code made with its | ||
admin's password where one is given), then `RATE` operations a second, the | ||
same operations in the same order on each from `SEED`: | ||
| ||
| share | operations | | ||
| --: | --- | | ||
| 56% | writes: posts, likes, follows, a profile, deletes, `applyWrites` of five posts, a post with an image blob | | ||
| 34% | reads: `getRecord`, `listRecords`, `getLatestCommit`, `describeRepo`, `getRepo` | | ||
| 10% | `refreshSession`, `describeServer` | | ||
| ||
It keeps what each account holds as its writes were answered (a follow or | ||
like replacing the account's others of the same subject, as | ||
`spec/VALIDATION.md`, "Duplicates", says), and once a minute reads one | ||
account back whole, nothing else done to it meanwhile: a record answered and | ||
gone is **lost**, one with another CID a **mismatch**. A write whose answer | ||
never came, as when the server was killed, is settled by the next read back. | ||
A firehose subscriber on each server holds every commit answered to come | ||
through within two minutes (**missing commits**), and subscribes again from | ||
its last `seq` after a kill or a stall. | ||
| ||
Every five minutes it writes each operation's count, p50, p99 and outcomes, | ||
and the firehose's lag, to `events-<name>.jsonl`, with each loss, mismatch, | ||
outage and 5xx as it happens, and its totals to `summary-<name>.json`. | ||
| ||
## Running it | ||
| ||
| Variable | Is | Default | | ||
| --- | --- | --- | | ||
| `TARGET_URL`, `TARGET_NAME`, `TARGET_DOMAIN`, `TARGET_ADMIN_PASSWORD` | one server: its base URL, a name for its files, the domain its handles end in (no dot), and its admin's password for invite codes | | | ||
| `SIDES` | several, in place of `TARGET_*`: a JSON list of `{name, url, domain, admin}` | | | ||
| `ACCOUNTS`, `RATE`, `SEED`, `RUN` | accounts on each, operations a second on each, the seed, and the handles' prefix (`<RUN>-001`) | `50`, `6`, `1`, `soak1` | | ||
| `OUT` | where its files go; a `STOP` file there pauses it | `/out` | | ||
| `DURATION_MS` | how long the load runs; unset, until it is stopped | unset | | ||
| `W_MS`, `DATA_DIR` | with `DURATION_MS`: the server's backfill window and its data directory, for the settled check (below) | | | ||
| `SETTLE_ONLY` | the settled check alone, on the accounts of an earlier run in `OUT` | unset | | ||
| ||
It carries on after a restart of its own from `state-<name>.json`: the | ||
accounts, signed in again, and what they hold, read from the server. | ||
| ||
Against a server of this machine from `harness/dev.mjs`, with the rate | ||
limits off so that one address may send it all: | ||
| ||
```sh | ||
cd harness && PDS_RATE_LIMITS_ENABLED=false node dev.mjs --port 2594 | ||
OUT=/tmp/soak TARGET_URL=http://127.0.0.1:2594 TARGET_DOMAIN=test \ | ||
ACCOUNTS=20 RATE=20 node ../bench/soak/soak.mjs | ||
``` | ||
| ||
Against a server on the internet, keep `RATE` under its `global` rate limit | ||
for one address (`spec/LIMITS.md`: 3000 in 5 minutes, so 10 a second) with | ||
room for the read-backs. | ||
| ||
## The settled check | ||
| ||
With `DURATION_MS`, `W_MS` and `DATA_DIR`, the load stops after | ||
`DURATION_MS`, the soak waits `2 W`, writes once to each account, and | ||
answers, as one line of JSON, the data directory's size against | ||
`spec/STORE.md`'s settled bound: three times the accounts' live states | ||
(`getRepo` whole and the blobs each holds), plus 128 KiB an account and | ||
1 MiB. `loadEndMiB` is the size when the load stopped, `leastMiB` the least | ||
in the 10 seconds after the writes, and `pass` whether that is within the | ||
bound. It exits 1 if not. | ||
| ||
The server must be started with `PDS_REPO_BACKFILL_LIMIT_MS` as `W_MS`, | ||
short, so that `2 W` is minutes. Across a restart: run with `DURATION_MS` and | ||
no `DATA_DIR` (the load alone), stop the server, wait `2 W`, start it again | ||
on the same data (`dev.mjs --keep`), and run with `SETTLE_ONLY=1` and | ||
`DATA_DIR`: each account's first use after the start is then that write. | ||
| ||
## Results | ||
| ||
`RESULTS.md`, with the runs' files in `data/`. | ||
bench/soak/RESULTS.mdnew+116−0
| @@ -0,0 +1,116 @@ | ||
# Soak results | ||
| ||
Each run's files are in `data/<run>/`: `summary-*.json` (totals), | ||
`events-*.jsonl.gz` (five-minute windows and every event), and where the | ||
machine was sampled, `samples.jsonl.gz` (each minute: each server's RSS, CPU | ||
and data directory, the free space, spec-pds's fsync histogram and the | ||
disk's counters) and `kills.jsonl`. | ||
| ||
## The machine | ||
| ||
A Hetzner Cloud server in Falkenstein (`fsn1`): 8 vCPUs, 15 GiB, other | ||
services running on it throughout. Each PDS in a container capped at 1 CPU | ||
and 1 GiB, the soak in one capped at 0.5 CPU and 512 MiB, all on one Docker | ||
network, the soak calling the servers directly. Both PDSes make their DIDs in | ||
a PLC directory of their own on the same network, and tell no relay of | ||
themselves. The reference is `@atproto/pds` `0.0.0-spaces-alpha-20261029171913`. | ||
A server was killed with SIGKILL to its main process, its restart policy | ||
starting it again. | ||
| ||
## 2026-11-13: nine hours side by side (`data/night1`) | ||
| ||
spec-pds `1707f04` and the reference, each with its data on a Hetzner Volume | ||
(network block storage); 50 accounts and 6 operations a second on each, | ||
from 07:08 to 16:14 UTC; four kills of each, in turn, 40 to 80 minutes apart. | ||
| ||
| | spec-pds | reference | | ||
| --- | --: | --: | | ||
| operations | 205,868 | 205,775 | | ||
| 5xx, rate limited | 0, 0 | 0, 0 | | ||
| commits answered and not on the firehose | 0 | 0 | | ||
| a kill to serving again | 0.7–0.8 s | 0.6–0.9 s | | ||
| unreachable, all kills | 9.4 s (3 outages) | 31.1 s (4 outages) | | ||
| RSS: first hour, last | 55 → 196 MiB | 275 → 284 MiB | | ||
| data directory: first hour, last | 127 → 1,601 MiB | 114 → 875 MiB | | ||
| of it: repositories and events | 1,363 MiB (tables 1,130, logs 233) | 649 MiB (repositories 168, events 481) | | ||
| of it: blobs | 213 MiB | 219 MiB | | ||
| repositories as `getRepo` answers them | 33.3 MiB | 33.2 MiB | | ||
| `getRecord` p50, the soak's (median of windows) | 2.5 ms | 12.2 ms | | ||
| post p99, the soak's (median of windows; worst) | 292 ms; 1,797 ms | 651 ms; 4,060 ms | | ||
| ||
The totals' `lost` and `mismatches` (about 4,500 and 200 on each side) are | ||
the soak's own, since fixed: it did not yet know that a follow or like | ||
replaces the account's others of the same subject, which both servers do in | ||
the same commit. The firehose showed each such commit's deletes. | ||
| ||
spec-pds's log, by method, server side: `createRecord` p50 8.2 ms, p99 | ||
255 ms, p99.9 779 ms, worst 2.8 s; `getRecord` p50 0.4 ms, p99 2.3 ms; | ||
`describeServer` p99 0.5 ms (the soak's own p99s of 100 to 650 ms for such | ||
calls were its own CPU's). Its slow writes held up the writes to other | ||
accounts under way at the time (1,908 of 2,489 such writes slow too) and | ||
not the reads (34 of 1,337); spec-pds was throttled for CPU in 22 of | ||
69,709 periods. Its slow syncs followed the volume's flush time | ||
(correlation 0.87 a minute): every write waits for one sync shared by the | ||
writes under way, so one slow flush holds up all of them. | ||
| ||
## 2026-11-13: the volume, then the server's own disk (`data/day-local-disk`) | ||
| ||
The same accounts on both, from 16:27 to 18:40 UTC; spec-pds's data moved at | ||
17:01 from the volume to the server's own disk, the reference's staying on | ||
the volume; spec-pds `3218378` from 18:11; one kill, of spec-pds, at 17:54:56. | ||
| ||
| spec-pds `createRecord`, server side | n | p50 | p99 | p99.9 | worst | | ||
| --- | --: | --: | --: | --: | --: | | ||
| on the volume, 16:28–17:00 | 4,977 | 8.9 ms | 126.8 ms | 391 ms | 1,198 ms | | ||
| on its own disk, 17:03–18:10, but the minute after the kill | 10,035 | 5.5 ms | 16.5 ms | 36.9 ms | 43 ms | | ||
| ||
| spec-pds's syncs | n | over 25 ms | over 100 ms | | ||
| --- | --: | --: | --: | | ||
| on the volume, 16:27–16:59 | 6,838 | 239 | 73 | | ||
| on its own disk, 17:02–18:09 | 3,017 | 0 | 0 | | ||
| ||
In the minute after the kill, writes took up to 1,175 ms (427 writes, p50 | ||
6.8 ms) as the accounts' state was read again; the syncs stayed fast. | ||
spec-pds 0 lost, 0 commits missing; its 53 mismatches were `getRecord`s | ||
answered `429` while the soak read every account back after its own restart, | ||
which the soak now takes as no answer. RSS: spec-pds 158 → 196 MiB, the | ||
reference 287 → 292 MiB. | ||
| ||
## 2026-11-13: under load and at rest (`data/at-rest`) | ||
| ||
Both fresh, each its data on the server's own disk, `W` of 2 minutes and the | ||
rate limits off; 20 accounts and 10 operations a second on each for 10 | ||
minutes, seed 7; then `2 W` with no write, one write to each account, and the | ||
least size in the 10 seconds after (the settled check, `README.md`). | ||
| ||
| | spec-pds `1707f04` | reference | | ||
| --- | --: | --: | | ||
| operations; 5xx, lost, mismatches, missing commits | 6,209; 0, 0, 0, 0 | 6,178; 0, 0, 0, 0 | | ||
| live state: repositories + blobs | 7.1 MiB (1.0 + 6.1) | 6.8 MiB (1.0 + 5.8) | | ||
| empty | 3 MiB | 12 MiB | | ||
| most under load (sampled each minute) | 32 MiB | 35 MiB | | ||
| when the load stopped | 25.6 MiB | 33.9 MiB | | ||
| after `2 W` with no write | 16.6 MiB | 33.9 MiB | | ||
| at rest, after a write to each | **7.7 MiB, 1.08 × live** | **33.9 MiB, 5.0 × live** | | ||
| spec-pds's settled bound | 24.9 MiB: within | 23.9 MiB: over | | ||
| ||
spec-pds folded its logs and let the events past the window go as it ran, | ||
its size falling as well as rising; the reference's only rose. Of the | ||
reference's at rest: its events' database 12 MiB, the write-ahead logs of it | ||
and of its accounts' database 4 MiB each, its repositories 9 MiB, its blobs | ||
7 MiB. | ||
| ||
## 2026-11-13: settled across a restart (a laptop) | ||
| ||
`harness/dev.mjs` on an Apple laptop, `W` of 2 minutes: 5 accounts and 30 | ||
operations a second for 4 minutes, the server stopped, `2 W` with it down, | ||
started again on the same data, then the settled check with `SETTLE_ONLY` | ||
(45 accounts more had been made before it, each with a write). | ||
| ||
| spec-pds | live | bound | at rest | | | ||
| --- | --: | --: | --: | --- | | ||
| `1707f04` | 9.0 MiB | 34.3 MiB | 37.5 MiB | over: no table rewritten | | ||
| `3218378` | 9.0 MiB | 34.3 MiB | 9.7 MiB | within: each table rewritten | | ||
| ||
The same without the restart, `1707f04`, 10 minutes of load: 44.8 MiB before | ||
the write, 24.1 MiB after, against a bound of 70.2 MiB. | ||
bench/soak/soak.mjsnew+618−0
618 lines changed: not loaded until asked for.