Skip to content

bench(db): record the cluster suite on v0.8.7 — the per-vhost forward hop - #5

Merged
luthermonson merged 1 commit into
mainfrom
results/cluster-v087
Sep 1, 2026
Merged

bench(db): record the cluster suite on v0.8.7 — the per-vhost forward hop#5
luthermonson merged 1 commit into
mainfrom
results/cluster-v087

Conversation

@luthermonson

Copy link
Copy Markdown
Contributor

The cluster suite has been authored and gate-validated since #4 but never recorded — lanes P2 and P3 need per-site clustered replication (ephpm#416), which was in no published image. The v0.8.6/v0.8.7 images were published 2026-09-01, so all five lanes now run in their intended mode for the first time.

Recorded on ephpm/ephpm:v0.8.7-php8.5 (image 85c3444cedcd), which also carries ephpm#429 — replicate per-site databases on bridge-only nodes.

Run health

All gates passed, 52/52 cells 100% HTTP 200, suite exit 0. The mode gate confirmed per-site clustered mode on all three nodes; ownership resolved to exactly one node (cdc_subscribers=2 on n2, elected as SQLite primary on n2 alone); per-site replication converged owner → non-owner before any cell was measured.

The three deltas

Comparison Result Verdict
S → W — cost of clustering −11.8% read / −13.0% write at c=1 Unresolved under this file's 20% rule (4–7% rep spread); bounded above at ~13%. Not the 0 RPS write collapse the historical sqld lane recorded.
P1 → P2 — cost to a tenant −16.7% (c=1), −28.1% (c=16), write path Resolved. Both c=1 cells have 0.2–0.3% rep spread, so the effect is ~50× the noise. wire-point control flat.
P2 → P3 — the sql/<site> hop −69.4% read / −53.7% write at c=1 Strongly resolved — 0.0–3.8% spread against 54–69% effects.

The headline number decomposes cleanly. The two fixtures agree independently on a per-statement cost:

  • read, 10 forwarded statements: p50 1.181 → 3.929 ms ⇒ 275 µs/statement
  • write, 1 forwarded statement: p50 1.299 → 1.554 ms ⇒ 255 µs/statement

Within 8% of each other across a 10× difference in statement count — the hop is paid per statement, not per request, so a ten-query page on a non-owner pays it ten times.

The wire-point control did its job. On the non-owner the non-forwarded path is not slower (+6.1% at c=1, +1.2% at c=16, sub-1% spread). Had it also been slow, the slowdown would not have been forwarding and the whole P2→P3 story would have collapsed into "n1 is slower than n2". It didn't.

Flagged rather than smoothed over

  • P1 bridge-point is anomalous — 494/553 RPS, 11.3% spread, p99 6–9 ms, and 36% slower than the write cell on the same node, which is true in no other lane. Taking it at face value would claim per-site clustering makes reads 58% faster. The read-path P1 → P2 delta is therefore reported as not measurable from this run, pending a re-record of P1 alone.
  • P3 bridge-write has a 10× p50→p95 tail at c=1 (1.55 ms p50, 15.4 ms p95, 25–26 ms p99) where the owner's cell sits at 2.3 ms p95. Read path shows no such tail.
  • The divergence probe reproduced exactly — a stock pdo_mysql write on the non-owner left the owner at 91463 and the writer at 91464. That fix (ephpm#432) is not in v0.8.7, so these numbers document the asymmetry as it ships. Per-site clustered mode remains experimental (Turso is Beta upstream).

Contents

  • docs/cluster-persite-v087.md — full write-up, both reps per cell, per-statement cost model, observations for ePHPm
  • DB-BENCH.md — Reference Numbers section filled in (was "None yet")
  • Default cluster image bumped v0.8.5 → v0.8.7 in scripts/run-db-bench.sh and db/bench-cluster.sh, and the "v0.8.6 images are not on Docker Hub" notes dropped — no longer true

Raw oha output is gitignored per repo convention and kept locally.

… hop

The cluster suite has been authored and gate-validated since #4 but never
recorded: lanes P2 and P3 need per-site clustered replication (ephpm#416),
which was in no published image. The v0.8.6/v0.8.7 images went up
2026-09-01, so all five lanes now run in their intended mode. Recorded on
ephpm/ephpm:v0.8.7-php8.5, which also carries ephpm#429 (replicate
per-site databases on bridge-only nodes).

All gates passed and 52/52 cells were 100% HTTP 200. Ownership resolved to
exactly one node by both independent observations, and per-site
replication converged owner -> non-owner before any cell was measured.

The headline, P2 -> P3: the sql/<site> forward hop costs -69% on the
ten-query read fixture and -54% on the single-INSERT write fixture at
c=1, with 0.0-3.8% rep spread. The two fixtures agree independently on a
per-STATEMENT cost of 255-275 us, which means a ten-query page on a
non-owner pays it ten times. The wire-point control came out level
(+6.1% at c=1), so the bridge delta is the hop and not a slower node --
the falsifiable half of the claim survived.

P1 -> P2 is -16.7% (c=1) / -28.1% (c=16) on the write path, with a flat
wire-point control. S -> W is -12/-13% at c=1 and formally unresolved
under this file's 20% rule, but nothing like the 0 RPS write collapse the
historical sqld lane recorded.

Two things flagged rather than smoothed over: P1's bridge-point cell is
anomalous (36% slower than the write cell on the same node) so the
read-path P1 -> P2 delta is reported as not measurable pending a
re-record, and P3's forwarded write has a 10x p50-to-p95 tail at a
concurrency of one.

The divergence probe reproduced exactly -- a stock pdo_mysql write on a
non-owner is not forwarded. That fix (ephpm#432) is not in v0.8.7, so
these numbers document the asymmetry as it currently ships.

Also bumps the cluster suite's default image to v0.8.7 and drops the
"v0.8.6 images are not on Docker Hub" notes, which are no longer true.
@luthermonson
luthermonson merged commit afb6757 into main Sep 1, 2026
@luthermonson
luthermonson deleted the results/cluster-v087 branch September 1, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant