Scratch chunks: 512 MiB kept on a PC of 32 GB, not 128 #182
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/readmet3xt-lab--foxhound!182
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-182"
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?
@mgrein on GitHub · 2026-11-30 20:21 UTC · original
mgrein:scratch-keep-512→main· +46 −4 · 1 files · 47 commits · closed without mergingOn a PC with 32 GB of RAM or less,
residency::limited_host_ram()caps the spare scratch chunks atSPARE_MOST(128 MiB). The lists in the air hold more than that, so whatever came back past 128 MiB was dropped and then made again for the next lists. In the world of a new retail game at Series X 1440p that was ~3 chunks a frame. Each one is awriteback_upload_buffer: a kernel allocation, made resident, with the driver waiting for the card (NtGdiDdDDIWaitForSynchronizationObjectFromCpu). That came to ~4 % of the list threads' busy time.This keeps up to 512 MiB (
SPARE_LIMITED) on such a PC, instead of 128.trim_spare_chunksstill drops spares when memory runs short, and PCs above 32 GB keep the 1 GiB they had.VICTORY_SCRATCH_KEEP_MB=<MiB>sets the cap on any PC.VICTORY_SCRATCH_KEEP_MB=ab:<a>:<b>switches every 20 seconds and logs each switch (scratch-keep switch <unix ms> on|off), for an A/B inside one run.Measured
RTX 4070, Ryzen 5 5600X, 32 GB RAM, Series X profile at 1440p, DLSS Quality,
VICTORY_SUBMIT_SPLIT=1,VICTORY_ASK_FIRST=1,VICTORY_OFF_LINE=1. One 15-minute idle run in the world with=ab:128:512; neighbouring 20 s windows are paired:VICTORY_THINline)The frame effect is small, since this is CPU spent beside the frame's critical path. The churn itself is gone.
cargo test -p victory-gpu --libpasses.🤖 Generated with Claude Code
@readmet3xt-lab on GitHub · 2026-12-01 01:36 UTC · original
A note on why this shows as closed: GitHub closed every open pull request by itself when main's history was rewritten on 2026-12-01 (text-only changes; every commit hash changed), and they cannot be reopened. This is not a rejection.
Your change is in the batch being tested for the next release, carried over as one commit with you as its author. Nothing is needed from you now; the result will be posted here.
Pull request closed