Repository navigation
Measure what a read that finds the entry below memory costs - #191
Merged
matrixarkai merged 1 commit intoOct 24, 2026
Merged
Conversation
Every read row in the allocation report was a memory hit. A read that misses
memory and finds the entry on the SSD tier does more than fetch it: before it
returns, it puts the entry back into memory, which is an admission -- and an
admission into a full tier evicts. That work is on the reader, and nothing
measured it.
allocations bytes
get, copying 1.00 1,024.0
get, promoting 13.00 25,334.0
Thirteen times the allocations and twenty-five times the bytes of the same
read served from memory. The figure is identical on both feature arms, which
says the cost is on our side of the store: the block was written through at
put time, so the eviction the promotion triggers finds the victim already on
the device and writes nothing.
The row asserts its own regime. Each read is checked to have found the value,
and afterwards the cache is asked how many of the reads reached a lower tier:
memory holds sixteen of the five hundred and twelve keys and the reads walk
the whole range, so all but a handful have to come off the SSD tier. Without
that check a larger memory capacity or a placement change would leave the row
reporting the cost of a memory hit under the promotion label.
The fixture fills with incompressible bytes, as the other tiered rows do, or
the blocks shrink and the memory capacity is never exceeded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Every read row in the allocation report was a memory hit. A read that misses
memory and finds the entry on the SSD tier does more than fetch it: before it
returns, it puts the entry back into memory, which is an admission — and an
admission into a full tier evicts. That work is on the reader, and nothing
measured it.
get, served from memoryget, promoting from a lower tierThirteen times the allocations and twenty-five times the bytes of the same
read served from memory.
The figure is identical on both feature arms, which says the cost is on our
side of the store rather than in the backend: the block was written through at
put time, so the eviction the promotion triggers finds the victim already on
the device and writes nothing.
The row asserts its own regime
Each read is checked to have found the value, and afterwards the cache is
asked how many of the reads reached a lower tier. Memory holds sixteen of the
five hundred and twelve keys and the reads walk the whole range, so all but a
handful have to come off the SSD tier.
Without that check, a larger memory capacity or a placement change would
leave the row reporting the cost of a memory hit under the promotion label —
a probe that quietly stops entering the regime it argues about agrees with
whoever reads it.
The fixture fills with incompressible bytes, as the other tiered rows do, or
the blocks shrink and the memory capacity is never exceeded.
Gates on both feature arms:
cargo fmt --check,clippy --all-targets -D warnings, both suites, the vocabulary check, and both reports with--require-passed.🤖 Generated with Claude Code