writeonce/bench/baseline.json
shoney.arickathil 6183a67dfc perf(db): group commit measured — ~2.9x durable write throughput, T5
databasev2 4 part A, task 5.

Controlled before/after — same machine, same workload (wmix 4000 32),
same build except db.c and vm.c, two runs each interleaved:

- per-statement barrier: 2213 / 2177 ops/sec, p50 7183 / 7251us
- group commit:          6216 / 6525 ops/sec, p50 3458 / 3444us
- ~2.9x throughput, ~2.1x lower p50

The full campaign confirms it a second way: s1 takes the inline path and
commits per statement BY DESIGN, so within one build the shard configs are
batching-off vs batching-on — 1467 -> 5117 ops/sec, mean batch 1.0 -> 5.43,
peak 1 -> 57. 3.5x, agreeing with the 2.9x above.

Recorded honestly:

- the BEFORE p99 is at the histogram ceiling (hist_add clamps at 20000us
  and both runs pinned there), so the true figure is >=20ms and unknown.
  The improvement is AT LEAST 2.3x; the old p99 was off the instrument
- durable.sN.mixwrite went 480 -> 492 ops/sec, i.e. UNCHANGED. That was
  the spec's original payoff metric and correcting it was part of the
  brainstorm: mix performs 20 writes at C=4, mean batch 1.01. A workload
  that never has two writes in flight cannot be helped by batching them
- seed is likewise unchanged: a serial writer has nothing to batch with
- so the payoff is real but CONDITIONAL — it appears where concurrent
  durable writes fan into the owner shard, and nowhere else

Two traps recorded in perf-targets §6:

- do not benchmark durability on /tmp: it is tmpfs here, where fdatasync
  is free. The same run reported 195000 ops/sec at p50 1us there against
  2200 at p50 7200us on ext4 — no barrier to amortise, so the measurement
  measures nothing. db-bench keeps its stores under bench/ for this reason
- the record count is not the update count: 7755 records for 4000 updates,
  because hist_dump and the done-marker are themselves durable inserts

- FIXED a regression I introduced in T4: master's committed baseline is
  FULL mode (N=20000, crash_reps=3, msg_n=200000) and I had overwritten it
  with quick-mode values. Regenerated from a full campaign; the full run
  now passes 106 checks 0 failures against it
- gate still bites: sN wmix ops_sec -70% -> FAIL on exactly that metric

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 09:54:52 +02:00

525 lines
No EOL
9.1 KiB
JSON

{
"_config": {
"N": 20000,
"crash_reps": 3,
"msg_n": 200000,
"note": "refresh only with a commit that says why; tolerances come from tolerance_for() in the driver",
"wal_n": 4000
},
"durable.s1.mixread.ops_sec": {
"dir": "higher",
"floor": 2070,
"tolerance_pct": 50,
"value": 8281
},
"durable.s1.mixread.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 2
},
"durable.s1.mixread.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 21
},
"durable.s1.mixwrite.ops_sec": {
"dir": "higher",
"floor": 230,
"tolerance_pct": 50,
"value": 920
},
"durable.s1.mixwrite.p50us": {
"dir": "lower",
"floor": 1784,
"tolerance_pct": 50,
"value": 446
},
"durable.s1.mixwrite.p99us": {
"dir": "lower",
"floor": 2252,
"tolerance_pct": 50,
"value": 563
},
"durable.s1.query.ops_sec": {
"dir": "higher",
"floor": 210260,
"tolerance_pct": 50,
"value": 841042
},
"durable.s1.query.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"durable.s1.query.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 4
},
"durable.s1.read.ops_sec": {
"dir": "higher",
"floor": 284155,
"tolerance_pct": 50,
"value": 1136621
},
"durable.s1.read.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"durable.s1.read.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 2
},
"durable.s1.seed.ops_sec": {
"dir": "higher",
"floor": 1076,
"tolerance_pct": 15,
"value": 4306
},
"durable.s1.seed.p50us": {
"dir": "lower",
"floor": 868,
"tolerance_pct": 15,
"value": 217
},
"durable.s1.seed.p99us": {
"dir": "lower",
"floor": 2080,
"tolerance_pct": 15,
"value": 520
},
"durable.s1.wmix.mean_batch": {
"dir": "higher",
"floor": 0.0,
"tolerance_pct": 100,
"value": 1.0
},
"durable.s1.wmix.ops_sec": {
"dir": "higher",
"floor": 366,
"tolerance_pct": 15,
"value": 1467
},
"durable.s1.wmix.p50us": {
"dir": "lower",
"floor": 1820,
"tolerance_pct": 15,
"value": 455
},
"durable.s1.wmix.p99us": {
"dir": "lower",
"floor": 2884,
"tolerance_pct": 15,
"value": 721
},
"durable.s1.wmix.peak_batch": {
"dir": "higher",
"floor": 0,
"tolerance_pct": 100,
"value": 1
},
"durable.s1.wmix.peak_staged": {
"dir": "lower",
"floor": 196,
"tolerance_pct": 100,
"value": 49
},
"durable.s1.write.ops_sec": {
"dir": "higher",
"floor": 554,
"tolerance_pct": 15,
"value": 2216
},
"durable.s1.write.p50us": {
"dir": "lower",
"floor": 1828,
"tolerance_pct": 15,
"value": 457
},
"durable.s1.write.p99us": {
"dir": "lower",
"floor": 2880,
"tolerance_pct": 15,
"value": 720
},
"durable.sN.mixread.ops_sec": {
"dir": "higher",
"floor": 1107,
"tolerance_pct": 50,
"value": 4429
},
"durable.sN.mixread.p50us": {
"dir": "lower",
"floor": 308,
"tolerance_pct": 50,
"value": 77
},
"durable.sN.mixread.p99us": {
"dir": "lower",
"floor": 4172,
"tolerance_pct": 50,
"value": 1043
},
"durable.sN.mixwrite.ops_sec": {
"dir": "higher",
"floor": 123,
"tolerance_pct": 50,
"value": 492
},
"durable.sN.mixwrite.p50us": {
"dir": "lower",
"floor": 2156,
"tolerance_pct": 50,
"value": 539
},
"durable.sN.mixwrite.p99us": {
"dir": "lower",
"floor": 6952,
"tolerance_pct": 50,
"value": 1738
},
"durable.sN.query.ops_sec": {
"dir": "higher",
"floor": 237529,
"tolerance_pct": 50,
"value": 950118
},
"durable.sN.query.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"durable.sN.query.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 3
},
"durable.sN.read.ops_sec": {
"dir": "higher",
"floor": 276701,
"tolerance_pct": 50,
"value": 1106806
},
"durable.sN.read.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"durable.sN.read.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 2
},
"durable.sN.seed.ops_sec": {
"dir": "higher",
"floor": 1085,
"tolerance_pct": 50,
"value": 4343
},
"durable.sN.seed.p50us": {
"dir": "lower",
"floor": 868,
"tolerance_pct": 50,
"value": 217
},
"durable.sN.seed.p99us": {
"dir": "lower",
"floor": 2040,
"tolerance_pct": 50,
"value": 510
},
"durable.sN.wmix.mean_batch": {
"dir": "higher",
"floor": 1.0,
"tolerance_pct": 100,
"value": 5.43
},
"durable.sN.wmix.ops_sec": {
"dir": "higher",
"floor": 1279,
"tolerance_pct": 50,
"value": 5117
},
"durable.sN.wmix.p50us": {
"dir": "lower",
"floor": 32832,
"tolerance_pct": 50,
"value": 8208
},
"durable.sN.wmix.p99us": {
"dir": "lower",
"floor": 48676,
"tolerance_pct": 50,
"value": 12169
},
"durable.sN.wmix.peak_batch": {
"dir": "higher",
"floor": 14,
"tolerance_pct": 100,
"value": 57
},
"durable.sN.wmix.peak_staged": {
"dir": "lower",
"floor": 11172,
"tolerance_pct": 100,
"value": 2793
},
"durable.sN.write.ops_sec": {
"dir": "higher",
"floor": 552,
"tolerance_pct": 50,
"value": 2210
},
"durable.sN.write.p50us": {
"dir": "lower",
"floor": 1828,
"tolerance_pct": 50,
"value": 457
},
"durable.sN.write.p99us": {
"dir": "lower",
"floor": 2948,
"tolerance_pct": 50,
"value": 737
},
"ram.s1.mixread.ops_sec": {
"dir": "higher",
"floor": 22322,
"tolerance_pct": 50,
"value": 89290
},
"ram.s1.mixread.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"ram.s1.mixread.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 3
},
"ram.s1.mixwrite.ops_sec": {
"dir": "higher",
"floor": 2480,
"tolerance_pct": 50,
"value": 9921
},
"ram.s1.mixwrite.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"ram.s1.mixwrite.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 2
},
"ram.s1.msgrate.msgs_sec": {
"dir": "higher",
"floor": 1568873,
"tolerance_pct": 15,
"value": 12550988
},
"ram.s1.query.ops_sec": {
"dir": "higher",
"floor": 256016,
"tolerance_pct": 50,
"value": 1024065
},
"ram.s1.query.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"ram.s1.query.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 2
},
"ram.s1.read.ops_sec": {
"dir": "higher",
"floor": 233448,
"tolerance_pct": 50,
"value": 933794
},
"ram.s1.read.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"ram.s1.read.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 2
},
"ram.s1.seed.ops_sec": {
"dir": "higher",
"floor": 53529,
"tolerance_pct": 15,
"value": 214119
},
"ram.s1.seed.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 15,
"value": 4
},
"ram.s1.seed.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 15,
"value": 12
},
"ram.s1.write.ops_sec": {
"dir": "higher",
"floor": 48021,
"tolerance_pct": 15,
"value": 192086
},
"ram.s1.write.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 15,
"value": 6
},
"ram.s1.write.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 15,
"value": 15
},
"ram.sN.mixread.ops_sec": {
"dir": "higher",
"floor": 7481,
"tolerance_pct": 50,
"value": 29924
},
"ram.sN.mixread.p50us": {
"dir": "lower",
"floor": 320,
"tolerance_pct": 50,
"value": 80
},
"ram.sN.mixread.p99us": {
"dir": "lower",
"floor": 624,
"tolerance_pct": 50,
"value": 156
},
"ram.sN.mixwrite.ops_sec": {
"dir": "higher",
"floor": 831,
"tolerance_pct": 50,
"value": 3324
},
"ram.sN.mixwrite.p50us": {
"dir": "lower",
"floor": 348,
"tolerance_pct": 50,
"value": 87
},
"ram.sN.mixwrite.p99us": {
"dir": "lower",
"floor": 608,
"tolerance_pct": 50,
"value": 152
},
"ram.sN.msgrate.msgs_sec": {
"dir": "higher",
"floor": 248897,
"tolerance_pct": 50,
"value": 1991179
},
"ram.sN.query.ops_sec": {
"dir": "higher",
"floor": 227790,
"tolerance_pct": 50,
"value": 911161
},
"ram.sN.query.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"ram.sN.query.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 2
},
"ram.sN.read.ops_sec": {
"dir": "higher",
"floor": 216919,
"tolerance_pct": 50,
"value": 867678
},
"ram.sN.read.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 1
},
"ram.sN.read.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 2
},
"ram.sN.seed.ops_sec": {
"dir": "higher",
"floor": 60469,
"tolerance_pct": 50,
"value": 241878
},
"ram.sN.seed.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 4
},
"ram.sN.seed.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 10
},
"ram.sN.write.ops_sec": {
"dir": "higher",
"floor": 41677,
"tolerance_pct": 50,
"value": 166708
},
"ram.sN.write.p50us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 8
},
"ram.sN.write.p99us": {
"dir": "lower",
"floor": 100,
"tolerance_pct": 50,
"value": 15
}
}