Skip to content

census: never_read age bands (bucketed by created age) - #48

Closed
shreyas-blacksmith wants to merge 1 commit into
patchsetfrom
shreyas/never-read-age-bands
Closed

shreyas-blacksmith wants to merge 1 commit into
patchsetfrom
shreyas/never-read-age-bands

Conversation

@shreyas-blacksmith

@shreyas-blacksmith shreyas-blacksmith commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

A never-read entry evicted minutes after creation is the cache failing to hold a write until its first read — the worst eviction outcome — but it was invisible as such: the never-read counter has no age dimension, and the created bands mix never-read with previously-read bytes.

This adds age_kind=never_read to bazel_remote_disk_cache_evicted_bytes_by_age, bucketed by created age. created remains the superset of every eviction; last_read remains the pure live-harm signal. Census JSONL rows are unchanged (they already carry evicted_never_read_bytes per tenant).

Feeds the young-eviction panels on the Bazel L1 Grafana board (fa#5699); until this rides a release+roll, the board approximates via the created bands.

Tested: census accounting test now asserts the 24h never_read band after a young never-read eviction; go test ./cache/disk/ green.

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled. (Staging)


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

A never-read entry evicted minutes after writing means the cache could
not hold a write until its first read - the worst eviction outcome. It
was counted only in the aggregate never-read counter (no age dimension)
and the created bands (mixed with read entries), so a young never-read
eviction rendered as a healthy-looking last_read mix.

New age_kind=never_read series on evicted_bytes_by_age, bucketed by
created age. created stays the superset; last_read stays the pure
live-harm signal.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shreyas-blacksmith

Copy link
Copy Markdown
Contributor Author

Not needed: the dashboard now composes the staleness histogram from the existing last_read bands + never-read counter, with never-read as a single band (we decided the created-age of never-read evictions isn't a stat we care about).

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