Skip to content

bench(6o-i8): a replica with its own AOF under sustained load (Investigation 2) - #203

Merged
akosidencio merged 1 commit into
devfrom
bench/v0.6o-i8-replica-capacity
Nov 28, 2026
Merged

akosidencio merged 1 commit into
devfrom
bench/v0.6o-i8-replica-capacity

Conversation

@akosidencio

Copy link
Copy Markdown
Member

Phase 6O-I8 PR 2: Investigation 2, the replica with its own AOF from 6O-I's D6. Reports and raw evidence only; no production code. The tools are in the large-transactions PR.

Result: explained and validated, with an operating limit

There is no sharp sustainable rate on this host (HDD, btrfs zstd, tcp_rmem max 32 MiB, 100,000 × 32-byte keys). These are failure counts from the load's start:

tx/s (100-SET transactions) H I P
1,380 and 1,610 0 0 0
1,840 (five 30-minute soaks, plus r5) 1 0 6 (5 in one young-link chain that did not recur on rerun; 1 after a 2.72 s disk stall)
2,070–2,300 several per 7 minutes in every build

No difference between the builds is detectable. I's and P's replicas do the same I/O.

Mechanism: the replica's link reader shares the applier's task. A stall in its AOF write(2) (behind fdatasync, by inference) stops it from reading. When the stall outlasts the buffering, the primary's byte budget disconnects it; that buffering is small on a young link.

Forced resyncs: of 24 resyncs forced under load, 5 failed once more within 31 s of the install and then held (H 2/8, I 1/8, P 2/8).

Controls: without the AOF, every build keeps up with the primary's maximum.

"More full syncs under overload" in 6O-I is faster cycles, not lower capacity: its replica works through its read-ahead about 3× faster.

Convergence: every completed run matched exactly:

  • the primary against the expected keyspace;
  • the replica's digest, DBSIZE and TTLs;
  • the replica restarted from its own AOF, where the restart was checked.

New release risk (pre-existing in H, P, v0.5.1 and v0.5.2)

  • A replica never autosaves: replicated writes do not mark the store dirty. Its AOF grew 23–25 GB in 30 minutes.
  • AOF replay reads the whole file into memory. r6's replica restart on about 11 GB of AOF was OOM-killed at 12.3 GB.

This is carried to the release gate as D10 (validation PR).

Contents

  • Reports: V0.6O-I8-REPLICA-SUSTAINABLE-THROUGHPUT.md, V0.6O-I8-REPLICA-RESYNC-ROOT-CAUSE.md.
  • Raw data:
    • r1: the ladder;
    • r2: 1,380–2,070 tx/s × 3;
    • r3: no-AOF, tmpfs and diag controls;
    • r4: soaks;
    • r5: forced resyncs, with socket sampling;
    • r6/r6b: soak reruns.

Reviews: C (replica saturation, 2 rounds) approved with changes; A round 3 approved with changes. All changes are applied.

…igation 2)

D6's second finding, explained and validated, with an operating limit.

There is no sharp sustainable rate on this host (HDD, btrfs zstd, tcp_rmem
max 32 MiB): failure counts by rate, counted from the load's start, show
no disconnect at 1,380-1,610 tx/s of 100-SET transactions in any build;
at 1,840 tx/s, over five 30-minute soaks, H 0 and I 0 failure episodes,
P 2 (a young-link chain in r4 that did not recur, and one disconnect after
a 2.72 s disk stall in r6); failures rising from 2,070 tx/s. No difference
between the builds is detectable, and I's and P's replicas do the same I/O.

Mechanism: the replica's link reader shares the applier's task, so a stall
in its AOF write(2) (behind fdatasync) stops it reading; the primary's
byte budget disconnects it when the stall outlasts the buffering, small on
a young link. 24 resyncs forced under load: 5 failed once more within 31 s
of the install, then held (H 2/8, I 1/8, P 2/8). Without the AOF every
build keeps up with the primary's maximum. "More full syncs under
overload" in 6O-I is faster cycles: its replica works through its
read-ahead about 3x faster.

Every run converged exactly: primary against the expected keyspace,
replica digest, DBSIZE and TTLs, and the replica restarted from its own
AOF where checked.

New, pre-existing in every build: a replica never autosaves (replicated
writes do not mark the store dirty), and AOF replay reads the whole file
into memory; r6's replica restart on 11 GB of AOF was OOM-killed at
12.3 GB. Carried to the release gate.

Raw data: r1 (ladder), r2 (1,380-2,070 x 3), r3 (no-AOF, tmpfs and diag
controls), r4 (soaks), r5 (forced resyncs, socket sampling), r6/r6b
(soak reruns).
@akosidencio
akosidencio merged commit 284a46b into dev Nov 28, 2026
13 checks passed
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