CSE Roadmap

Core tier · about 5 hours · 13 parts

Part 6 of 13 · 2 min read

What the example found

Storage costs by run length and hybrid interval, replay divergence, and staleness by pause length.

How to read the storage table: each row is a run length; each column's pair is total bytes written and average events replayed on resume, for the three storage modes.

Steps Snapshot kB / replay Log kB / replay Hybrid k=20 kB / replay
50 389 / 0 16 / 25.5 34 / 8.7
200 6,115 / 0 64 / 100.5 399 / 9.5
800 97,421 / 0 257 / 400.5 5,243 / 9.5

What to notice: going from 200 to 800 steps multiplies the snapshot cost by about 16 but the log cost by only about 4. The snapshot's quadratic growth and the log's linear growth are not a subtle difference. They diverge fast enough that snapshotting every step becomes impractical well before a run reaches a thousand steps.

How to read the hybrid-interval table: each row is a different snapshot interval k, all at 200 steps; the trade is bytes written against events replayed.

Interval k (200 steps) kB written Events replayed
5 1,311 2.0
20 399 9.5
50 216 24.5

What to notice: tightening the interval from 50 to 5 (a 10x smaller gap between snapshots) cuts replayed events from 24.5 to 2.0. But it costs roughly 6 times the bytes written. The interval is a genuine dial, not a setting with one obviously correct value. The right choice depends on which resource (storage or resume latency) you can least afford to spend.

How to read the replay-divergence table: this is a single measured rate, not a sweep.

Replay method (500 trials, 20-step runs) Diverges from the original run
Live model call with a fresh seed 99.6 to 100%
Re-apply the recorded log 0% (by construction)

What to notice: the near-certainty of divergence for a live re-run holds even over just 20 steps. This is not a problem that only shows up in very long runs. A single fresh random draw anywhere in the replay is enough to send the whole run down a different path.

How to read the staleness table: each row is a pause length; the share is resumes that acted on a changed fact without re-checking it.

Pause before resume Resumed on a false premise
1 hour 2.2%
6 hours 11.5%
24 hours 38.4%
72 hours 76.6%

What to notice: the share roughly triples between 6 and 24 hours (4x the pause length) and roughly doubles again by 72 hours. Staleness risk compounds with pause length rather than staying flat. That is exactly what the "any hour could break it" mechanism in the code predicts.

{{svg:storage|Snapshot, event log and hybrid trade bytes written against events replayed.}} {{svg:results|Bytes written and events replayed for five stores, and the share of resumes that act on a false premise by pause length.}}