benchmarking: walk RAM after resume (--mem-read) and rotate the churn window - #1310
Open
Lucky Abolorunke (Oneimu) wants to merge 1 commit into
Open
benchmarking: walk RAM after resume (--mem-read) and rotate the churn window#1310Lucky Abolorunke (Oneimu) wants to merge 1 commit into
Lucky Abolorunke (Oneimu) wants to merge 1 commit into
Conversation
Lucky Abolorunke (Oneimu)
force-pushed
the
mem-readram-walk
branch
from
August 29, 2026 01:32
9b13d57 to
953e334
Compare
Lucky Abolorunke (Oneimu)
force-pushed
the
mem-readram-walk
branch
from
August 29, 2026 02:11
953e334 to
e4142cd
Compare
Lucky Abolorunke (Oneimu)
marked this pull request as ready for review
August 29, 2026 02:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What pr does
Makes resume measurements require the actor's memory to actually work: adds
ReadRAM— a glutton request that walks the working set (reads one byte per 4KiB page across the requested size) before responding, plus a--mem-readknob so the benchmark cycle performs that walk right after every resume.Today's cycle proves an actor is reachable after resume, not that its memory is usable: the ping answers without touching the working set. A real application must read its memory to serve requests. This matters for where restore optimization is headed — a lazy/on-demand restore would look great on a benchmark that never reads memory (resume returns fast, ping returns fast) while real first-requests would stall faulting pages back in. With the walk in the cycle, "resume + first response" includes the cost of making memory usable, however the restore path schedules that work: eager restore pays it during resume, lazy restore would pay it during the walk — either way the total is in the tracked numbers.
Also upgrades churn with
WRITE_MODE_OVERWRITE_ROTATE: overwrite at a per-key cursor that advances past each write and wraps, so repeated churn walks the whole array over time instead of re-dirtying the same prefix every cycle.How it works
ReadRAM(key, size)walks the firstsizebytes (suffixed string, e.g."1Gi"; empty walks the whole array) of aWriteRAMallocation, one byte per 4KiB page — the cheapest touch that forces every page resident. The response returns bytes walked plus an XOR checksum of the sampled bytes so the reads are observable and can't be elided.GluttonReadRAMstats row — it never pollutes ping or resume latencies. Today (eager restore) it reads warm memory in milliseconds; a jump in this row is the signal that restore work got deferred onto the request path.--mem-readin the suite's locustflags:→/boomer-config→ the Go worker, passed verbatim to the wire; glutton is the only parser. Empty = disabled; the tracked large-memory suites set it to the full target (walk everything — strongest signal, simplest story). Existing suites unchanged.Testing
go test -raceacrosscmd/benchmarking/gluttonandinternal/benchmarking/boomer/...: PASS. New tests cover the walk's byte count and checksum, missing-key/bad-size errors, cycle call order (fill → read → churn with the right sizes and modes), rotate-mode cursor wrap, disabled-by-default, and walk-before-fill as a no-op.