mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2415] [Feature]: kv_stream page-pool eviction: measure CLOCK against selection-aware LRFU before changing anything #978
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#978
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MrKop-git on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2415
What do you want to do?
With
--kv-resident, a streamed QSA layer keeps its full K/V in pinned RAM and a page pool in VRAM.kv_stream_resolvemakes every block the selection names resident, and when the pool is full a CLOCK (second-chance) sweep picks the victim. The QSA indexer already names the blocks each step reads — the hit signal is right there, andkv_stream_countersalready reports misses / lookups / calls.I would like a measured eviction-policy sweep for that pool: replay real selection traces through CLOCK and through a selection-aware LRFU keep score (each hit adds the selection's weight, every step decays:
KS = λ·KS + hit, λ around 0.5), and adopt the winner as the default only where it measurably wins. The same "eviction policy is a measured question" approach as #1089 takes for the expert cache'sadmit.Why
Fewer RAM→VRAM block re-reads is less PCIe traffic and shorter stalls on long contexts where KV streaming is on (64K and up, as setup chooses). The page pool is only a cache —
kv_stream_parityproves the streamed readers see exactly the resident values — so a policy change cannot change any answer; it is purely a throughput question.How I would check it
tools/replay_cache_policy.py, replaying dumped selection traces through both policies and reporting misses and bytes re-read;--kv-evict clock|lrfu, defaultclockunchanged); a default change only with the numbers in the PR.Context
Outside evidence, for motivation only: LRFU keep scores with a decay factor are what ActKV (arXiv:2609.31395) uses for agentic KV retention, and kvmem 0.18.0 ships LRFU (lambda=0.5, top-frac=0.9) as its default history weighting. Whether that beats CLOCK on this engine's QSA selections is exactly the measurement this issue asks for.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.