Pool: empty blocks kept follow the card's headroom below 85% (VICTORY_SPARES_BY_HEADROOM=1, off) (#94) #285
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!285
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-285"
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?
@GDemay on GitHub · 2026-11-26 14:23 UTC · original
GDemay:perf/spares-by-headroom→main· +53 −3 · 1 files · 1 commits · openWhat and why
spares()(crates/victory-gpu/src/pool.rs) keeps either 2 blocks or all 64 (4 GiB) by a binary line at 85 % of the card's budget, whatever headroom is actually left below it. On 8-16 GB cards that overshoots: a 16 GB card 12 GB in held 4 GiB of empty blocks with about a GB of budget left, and the paging that followed ran at about a frame a second; on 8 GB cards it costs about 1-1.5 GB of VRAM (#94, #76's 8-16 GB runs; the 7900 XTX is unaffected — 24 GB keeps all 64).Behind
VICTORY_SPARES_BY_HEADROOM=1(off by default, read and explained in a comment where it is read): at most half of what is left below 85 % of the budget is kept, in 64 MiB blocks, the ends as before — a 24 GB card 10 GB in keeps all 64 blocks, one at or past 85 % keeps 2, memory pressure (room'skeep == false) keeps 2, and with the switch off the choice is exactly as today. Composes withVICTORY_RESIDENCYunchanged: it only feedsspares()a smaller number.The issue's sketch, with the boundary cases spelled out: 16 GB at 12 GB in -> 12 blocks (768 MiB), 8 GB at 5.5 GB in -> ~5 blocks.
Measurements or Tested
pool::tests::spares_follow_the_cards_headroom_when_asked(exact GiB arithmetic, both modes, all boundary cases), alongside the existingempty_blocks_stay_while_the_card_has_room, which keeps passing through the unchanged default path.CARGO_FEATURE_PURE=1 cargo clippy -p victory-gpu --all-targets [--all-features] --locked --target x86_64-pc-windows-msvc -- -D warningsis clean apart from the two errors already on main (missing_transmute_annotations#169,unnecessary_mut_passedwatch.rs:3626 #241).depth_bounds_pipeline_loads_and_filters_draws(WARP, #169); the new test passes in both jobs.Not run
VICTORY_SPARES_BY_HEADROOM=1(for example #76's and #124's setups) would say the number; the 7900 XTX should be unchanged, as the clamp keeps 64 blocks there.AI-assisted: yes
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.