[CLAIM] VSP-03: discard dead streaming-pool pages from the section's lasting view (working set) #8
Labels
No labels
accessibility
benchmark
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
task-claim
telemetry
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/monte-alt--vesper#8
Loading…
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?
@thefafu on GitHub · 2026-11-30 00:20 UTC · original
Roadmap Task ID
VSP-03
Technical Plan & File Scope
File:
crates/vesper-hle/src/modules/xmem.rsonly.Problem measured (RX 9060 XT / 32 GB, Series X, 4K out + HW RT; details in issue 5): the whole-section view kept by
Section::window(VESPER_SECTION_WINDOW) keeps every page DirectStorage wrote or the books read through it in the working set, also after the title unmapped and gave the page back. Working set 22-25 GB, free RAM 1-4 GB; spikes over 100 ms are 22 % of spikes with 1-2 GB free RAM and 5 % with 5-6 GB free.Change (
VESPER_POOL_DISCARD=1, off by default):Sectiongets resident/discarded/fresh bits;window()marks pages used;change()andunmap()note pages that lost a view; a thread, a while after (adaptive 2-10 s) and only while free RAM is underVESPER_POOL_DISCARD_BELOW_MB, MEM_RESETs pages shown by no view but the whole-section view under the views' lock, in pieces of 64 pages, then VirtualUnlocks them after the lock (pages used again since their unmapping are kept). A "pool discard:" line every 30 s.Measured so far: 11-28 GB let go per drive, under 0.5 % needed again; working set peak ~25.5 GB down to 18-23 GB. A first version with 64 MiB pieces under the lock stalled the title's
CopyPageMappings(77 ms a frame on the frame chain in aVESPER_TIMELINEtrace); with 4 MiB pieces spikes over 200 ms went 14 -> 7 a minute and over 500 ms 1.3 -> 0.4.Verification for the PR: xmem unit tests, clippy
-D warnings, xtask tests, before/after benchmarks (Avg/Med FPS, p95, GPU busy, peak private RAM, working set) from the same restored save and route.Contributor Rules
@thefafu on GitHub · 2026-11-30 00:21 UTC · original
Closing this as a duplicate of #4, which claimed VSP-03 earlier and touches the same file (
xmem.rs). It did not show up in the issue search when I checked before filing (search index delay), sorry for the noise.The pool-discard change described here can follow as its own scoped change once #4 has landed; the measurements are in #5, and I left a note on #4.