Back to the demo

What the lab measured

These numbers come from the lab on my laptop, read from the summaries committed in bench/results when this page was built. Each figure is the median over the runs of the sessions that stood, with the range under it, and a difference smaller than the range isn't a difference. The live demo isn't measured here: it runs under CPU quotas on a shared server, so it shows behaviour, not speed.

Where they were taken

The commit floor, the fsyncs a second this disk can do, fell from about 500 to about 300 between 2026-11-05 and 2026-11-07. The one change on record in between is a restart of the WSL VM. Windows itself flushes about 300 a second on that disk, so either the disk got slower or the VM didn't pass every flush through before, and there is no reading from before to tell which. Every series below ran after the fall, and so did all of E0 but its first run, which is marked in its table. The older series stay in the repo but aren't put next to these: e1b, e1b-20k and e1b-naive ran at the old floor, and e1a ran at the new one but at an older commit and without redis and queue.

Capacity without the room

Each line at a constant purchase rate, stepped from 100 to 3,200 a second.

From bench/results/e1a-all at 97de3a2: 3 of 3 sessions stood. In those, 132 of 132 runs were used, besides 6 probe runs shown on their own.

Floors in the sessions that stood: 291 (279 to 292) fsyncs a second, SELECT 1 at 0.043 ms (0.043 ms to 0.044 ms) and the empty endpoint at 0.184 ms (0.178 ms to 0.19 ms), at p50.

ApproachConnectionsSessionsSustainedCeilingProbe
update83200275266 to 276—
update203200247246 to 249—
update643200204—
for_update203100216215 to 219—
optimistic203100under 100 in 110070 to 100—
redis2031,6003,2213,212 to 3,279capped by the ladder3,4383,398 to 3,516offered 6,400, 3 single runs
queue2031,6003,2003,196 to 3,215capped by the ladder3,9973,951 to 4,027offered 6,400, 3 single runs

The drop without the room, up to 10,000 buyers

1,000 units and a burst of buyers in one second, then a tail. Every approach, with naive there to show the checker catches an oversell.

From bench/results/e1b-all at 97de3a2: 3 of 4 sessions stood. In those, 69 of 69 runs were used.

  • session 3 was sent back: its anchor's time to sell out fell 10.3% from e1b-all's first session.
4 attempts weren't counted
  • Windows outside the VM averaged 16.1% of the machine, Windows outside the VM reached 31.5% of the machine
  • the VM outside the lab reached 51.2 MB/s of IO
  • the generator's schedule lag was 36.6 ms at p99, at or over the 20 ms limit
  • the generator's schedule lag was 27.4 ms at p99, at or over the 20 ms limit

Floors in the sessions that stood: 277 (270 to 281) fsyncs a second, SELECT 1 at 0.044 ms (0.043 ms to 0.044 ms) and the empty endpoint at 0.187 ms (0.183 ms to 0.195 ms), at p50.

ApproachBuyersRunsSold out, msHold p50, msHold p99, msSold-out answer p50, msErrors, %OversellUnsoldStuckEarlier lost, %Verdict
naive2,50035,0824,652 to 5,3064,6304,615 to 4,8509,9059,889 to 9,917—8.54.5 to 8.61,1781,132 to 1,299———3 of 3
naive5,00034,8094,690 to 4,9045,4105,321 to 5,5619,9069,902 to 9,912—27.226.9 to 27.32,1662,165 to 2,199———3 of 3
naive10,00034,9404,857 to 5,0267,0416,703 to 7,3599,9339,923 to 9,943—51.150.9 to 53.32,7342,461 to 2,861———3 of 3
update2,50034,1263,984 to 4,1511,8391,792 to 1,9013,8893,740 to 3,9112.12.1 to 2.2000053.752 to 53.93 of 3
update5,00034,2494,068 to 4,2501,8961,852 to 2,0224,0793,902 to 4,0812.32.3 to 2.4000067.167 to 67.43 of 3
update10,00034,0804,023 to 4,2831,9761,928 to 2,0433,9573,904 to 4,164118.2 to 14000085.383 to 87.53 of 3
for_update2,50034,8614,586 to 4,8802,0952,093 to 2,1474,6064,331 to 4,6262.22.1 to 2.2000053.353.2 to 54.33 of 3
for_update5,00034,7784,777 to 4,8712,2922,141 to 2,3774,6054,601 to 4,6992.62.4 to 2.600006766.4 to 67.63 of 3
for_update10,00034,7124,594 to 4,8712,7012,616 to 2,9694,5814,453 to 4,7432,4462,128 to 2,503000082.380.3 to 82.53 of 3
optimistic2,5003never2,3112,212 to 3,0509,8679,776 to 9,895—81.781.6 to 81.70881881 to 891062.961.9 to 65.53 of 3
optimistic5,0003never1,6451,564 to 2,1839,8909,793 to 9,919—87.70863854 to 86906967.4 to 703 of 3
optimistic10,0003never3,3083,125 to 3,7119,8079,781 to 9,940—90.390.2 to 93.10876869 to 882074.549.6 to 75.53 of 3
redis2,5003598540 to 737161136 to 299401344 to 5701.51.4 to 1.500005352.6 to 53.33 of 3
redis5,0003537500 to 614185175 to 214428416 to 5191.4000067.367 to 67.43 of 3
redis10,0006564560 to 594230225 to 240525519 to 5631.41.4 to 1.5000087.386.5 to 886 of 6
redisunsampled twin10,0006557544 to 677235222 to 284529509 to 6501.51.4 to 1.5000086.865.4 to 88.76 of 6
queue2,5003340336 to 340121115 to 125187186 to 1963,0142,972 to 3,313000052.352 to 52.43 of 3
queue5,0003421314 to 432237142 to 274357224 to 3594,0583,860 to 4,1710000 to 3066.866.5 to 67.23 of 3
queue10,0003324323 to 354203193 to 226311310 to 3304,7864,784 to 4,7990000 to 1088.386.4 to 88.83 of 3

The unsampled twin is a redis run without the slot sampler, so its numbers show what the sampling costs.

The drop without the room, 20,000 buyers

The Postgres approaches at 20,000. redis and queue ran as probes only, since at 20,000 arrivals in a second the generator is past its ceiling of about 10,000 a second on four vCPUs, and their runs lagged over the 20 ms limit.

From bench/results/e1b-all-20k at 97de3a2: 5 of 7 sessions stood. In those, 30 of 30 runs were used, besides 10 probe runs shown on their own.

  • session 3 was sent back: its anchor's time to sell out fell 10.2% from e1b-all's first session.
  • session 5 was sent back: its anchor's time to sell out fell 11.2% from e1b-all's first session.
1 attempt wasn't counted
  • the generator's schedule lag was 20.4 ms at p99, at or over the 20 ms limit

Floors in the sessions that stood: 287 (281 to 296) fsyncs a second, SELECT 1 at 0.042 ms (0.041 ms to 0.044 ms) and the empty endpoint at 0.187 ms (0.187 ms to 0.192 ms), at p50.

ApproachBuyersRunsSold out, msHold p50, msHold p99, msSold-out answer p50, msErrors, %OversellUnsoldStuckEarlier lost, %Verdict
naive20,00054,9104,732 to 4,9597,9657,957 to 7,9849,9599,955 to 9,960—85.184.7 to 85.21,7991,763 to 1,815——58.458 to 59.25 of 5
update20,00054,2203,975 to 4,2492,6102,535 to 2,6444,3054,107 to 4,3343,3663,096 to 3,47300008.57.8 to 9.35 of 5
for_update20,00054,8944,694 to 4,9278,0637,780 to 8,3179,9709,966 to 9,9807,5737,561 to 7,64932.331.8 to 34.200055.754.8 to 60.95 of 5
optimistic20,0005never4,8664,729 to 5,0529,9479,884 to 9,958—9493.6 to 94.10899891 to 900052.752.1 to 54.55 of 5
redisprobe, 0 of 5 usable20,0005508417 to 547444377 to 483724572 to 7852.22 to 2.200002.81.9 to 2.95 of 5
queueprobe, 0 of 5 usable20,0005317297 to 329374349 to 395537528 to 5705,9655,881 to 6,2740031 to 19005 of 5

A probe row is single runs, one per session after the closing anchor, never retried, and outside the series' median rule. Its figures come from runs the series didn't count, and the row says how many of them were usable.

Faults during the drop

10,000 buyers with a fault injected while they buy, compared with the same approach without it at the same commit.

From bench/results/e3 at 97de3a2: 3 of 3 sessions stood. In those, 81 of 81 runs were used.

2 attempts weren't counted
  • the generator's schedule lag was 30.0 ms at p99, at or over the 20 ms limit
  • Windows outside the VM reached 34.6% of the machine

Floors in the sessions that stood: 281 (280 to 294) fsyncs a second, SELECT 1 at 0.044 ms (0.041 ms to 0.045 ms) and the empty endpoint at 0.187 ms (0.185 ms to 0.188 ms), at p50.

ApproachFaultRunsSold out, msWithout it, msHold p99, msWithout it, msErrors, %Verdict
updatean API instance killed34,4374,431 to 4,6094,0804,023 to 4,2834,3064,297 to 4,4763,9573,904 to 4,1640.33 of 3
updatethe worker killed34,6194,512 to 4,6384,0804,023 to 4,2834,4954,394 to 4,5163,9573,904 to 4,16403 of 3
updatePostgres slowed by 5 ms each way33,9323,924 to 4,1134,3114,197 to 4,3203,8113,809 to 3,9914,1884,070 to 4,20103 of 3
for_updatean API instance killed35,0084,965 to 5,4004,7124,594 to 4,8719,4419,407 to 9,6104,5814,453 to 4,7433.33.1 to 43 of 3
for_updatethe worker killed35,2175,177 to 5,5974,7124,594 to 4,8719,9515,325 to 9,9694,5814,453 to 4,7430.10 to 23 of 3
for_updatePostgres slowed by 5 ms each way314,57414,539 to 14,6885,2785,073 to 5,3959,9649,945 to 9,9729,9569,939 to 9,96015.313.5 to 15.73 of 3
optimistican API instance killed3nevernever9,7419,681 to 9,8159,8079,781 to 9,94090.290.2 to 90.33 of 3
optimisticthe worker killed3nevernever9,9579,895 to 9,9789,8079,781 to 9,94090.23 of 3
optimisticPostgres slowed by 5 ms each way3nevernever9,8319,783 to 9,8619,9469,869 to 9,96490.390.3 to 92.83 of 3
redisan API instance killed32,6592,547 to 2,706564560 to 5941,9841,871 to 2,017525519 to 5630.33 of 3
redisthe worker killed3566534 to 572564560 to 594536510 to 548525519 to 56303 of 3
redisPostgres slowed by 5 ms each way3798735 to 1,045552545 to 6511,014701 to 1,023523521 to 60903 of 3
redisRedis restarted3587569 to 595564560 to 5941,808530 to 1,995525519 to 56303 of 3
redisRedis killed3569549 to 593564560 to 5941,7191,607 to 1,731525519 to 56303 of 3
redisRedis killed and its last writes cut3572566 to 577564560 to 5941,7121,633 to 1,734525519 to 56303 of 3
redisRedis wiped3564532 to 605564560 to 594523492 to 1,801525519 to 56303 of 3
queuean API instance killed3337330 to 349324323 to 354359321 to 363311310 to 3305.63 to 6.33 of 3
queuethe worker killed3329313 to 335324323 to 354295294 to 310311310 to 33003 of 3
queuePostgres slowed by 5 ms each way3560474 to 569394364 to 455550526 to 690355317 to 45103 of 3

Random faults, 200 runs

Each run drew an approach, a fault and the moment to inject it at random, from bench/results/campaign/2026-11-18 at 9744372. 0 of them ended with a wrong verdict. It judges verdicts, not speed, so it ran on the laptop in everyday use rather than emptied.

ApproachFaultRunsWrongWhere it landedWhat came of it
updatean API instance killed110in the sell-out 7, after the sell-out 4, while settling 0, after settling 0, never landed 0purchases in flight at the kill 11, buyers left without a final answer 0
updatethe worker killed110in the sell-out 8, after the sell-out 11, while settling 0, after settling 0, never landed 0—
updatePostgres slowed by 5 ms each way110in the sell-out 6, after the sell-out 5, while settling 0, after settling 0, never landed 0sold out inside the slowed window 6, sold out outside it 5, never sold out 0
for_updatean API instance killed110in the sell-out 2, after the sell-out 9, while settling 0, after settling 0, never landed 0purchases in flight at the kill 11, buyers left without a final answer 0
for_updatethe worker killed110in the sell-out 7, after the sell-out 11, while settling 0, after settling 0, never landed 0—
for_updatePostgres slowed by 5 ms each way110in the sell-out 5, after the sell-out 6, while settling 0, after settling 0, never landed 0sold out inside the slowed window 2, sold out outside it 9, never sold out 0
optimistican API instance killed110in the sell-out 11, after the sell-out 0, while settling 0, after settling 0, never landed 0purchases in flight at the kill 11, buyers left without a final answer 11
optimisticthe worker killed110in the sell-out 11, after the sell-out 0, while settling 0, after settling 0, never landed 0—
optimisticPostgres slowed by 5 ms each way110in the sell-out 11, after the sell-out 0, while settling 0, after settling 0, never landed 0sold out inside the slowed window 0, sold out outside it 0, never sold out 11
redisan API instance killed110in the sell-out 5, after the sell-out 6, while settling 0, after settling 0, never landed 0purchases in flight at the kill 10, buyers left without a final answer 0, orphans given back by the reconciler 0, orphans found held 0, no settle line 0
redisthe worker killed100in the sell-out 4, after the sell-out 10, while settling 0, after settling 0, never landed 0the keeper was in a statement 0, between statements 10, taken over before the restart 10, not taken over before the restart 0
redisPostgres slowed by 5 ms each way100in the sell-out 5, after the sell-out 5, while settling 0, after settling 0, never landed 0sold out inside the slowed window 5, sold out outside it 5, never sold out 0
queuean API instance killed100in the sell-out 2, after the sell-out 8, while settling 0, after settling 0, never landed 0purchases in flight at the kill 9, buyers left without a final answer 0
queuethe worker killed100in the sell-out 4, after the sell-out 10, while settling 0, after settling 0, never landed 0the keeper was in a statement 8, between statements 10, taken over before the restart 10, not taken over before the restart 0
queuePostgres slowed by 5 ms each way100in the sell-out 5, after the sell-out 5, while settling 0, after settling 0, never landed 0sold out inside the slowed window 5, sold out outside it 5, never sold out 0
redisRedis restarted100in the sell-out 4, after the sell-out 6, while settling 0, after settling 0, never landed 0orphans given back by the reconciler 0, orphans found held 1, no settle line 0, slot conflicts at settling 3
redisRedis killed100in the sell-out 5, after the sell-out 5, while settling 0, after settling 0, never landed 0orphans given back by the reconciler 0, orphans found held 1, no settle line 0, slot conflicts at settling 0
redisRedis killed and its last writes cut100in the sell-out 5, after the sell-out 5, while settling 0, after settling 0, never landed 0orphans given back by the reconciler 0, orphans found held 0, no settle line 0, slot conflicts at settling 4, the cut lost writes 6
redisRedis wiped100in the sell-out 3, after the sell-out 7, while settling 0, after settling 0, never landed 0orphans given back by the reconciler 0, orphans found held 0, no settle line 0, slot conflicts at settling 0

The lab checking itself

Before a series, the lab checks the laptop and its own tools, with nothing else running.

RunCommitPassedPlanted loadsGeneratorPool lag p99, msReplicaLogical
2026-10-31 e0-1at the old floorf22f27byescaughtagrees with k65.98,000 a second on 4 vCPUs510508
2026-11-17 e0-297de3a2noWindows outside the VM averaged 13.9% of the machineWindows outside the VM averaged 13.5% of the machinecaughtagrees with k64.48,000 a second on 4 vCPUs271269
2026-11-17 e0-397de3a2noWindows outside the VM averaged 13.1% of the machineWindows outside the VM averaged 12.3% of the machinecaughtdiffers from k64.28,000 a second on 4 vCPUs271273

Still to be measured