Reclaim idle upload memory under host pressure #386
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/Belobug--VIctory-Belobug-AMD!386
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-386"
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?
@CauaHenriqueM on GitHub · 2026-11-26 23:25 UTC · original
CauaHenriqueM:fix/trim-idle-uploads→a-publier· +50 −51 · 3 files · 1 commits · openMotivation
The default texture upload pool can hold empty staging blocks until another upload requests an allocation. Under host memory pressure, these blocks and unused command-list scratch can keep committed RAM after their work has finished.
Changes
VICTORY_RESIDENCYto control the optional speculative texture limits.Validation
@MamaLeVrai on GitHub · 2026-11-27 01:23 UTC · original
Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At
3f91df5:cargo test --release -p victory-gpu --lib, 4 runs: 3 passed whole (396 passed, 0 failed); one hadhost::refresh_tests::unchanged_ranges_are_knownfail once. It did not come back in 10 runs alone or 3 more whole runs, and the base4eb6cfdshowed a flakywatchtest in the same session. So I take it as a flake, not this PR.AI-assisted (Claude Code); no game data.
@Gabriel-Ramaldes on GitHub · 2026-11-27 13:32 UTC · original
In-game test on AMD RDNA 4 with 32 GB, at
3f91df5(a-publier4eb6cfd+ this PR), against4eb6cfdas shipped.Setup:
cargo test --locked -p victory-gpu --lib -- --test-threads=1: 396 passed, 0 failed, 34 ignored.scripts\play.ps1's settings (Series X).ms/frameover world lines, first quarter dropped.memory:line.4eb6cfdvictory-image-…dll+0x2215c35, write 0x0, before the world). The same happened to #512's build the same day.AI-assisted (Claude Code); no game files.
@adrianmjim on GitHub · 2026-11-27 14:14 UTC · original
In-game numbers at
3f91df5against a-publier4eb6cfd, on an RX 7900 XT (RDNA 3, 20 GB), driver 32.0.32029.2010, Ryzen 7 5800X, 32 GB RAM, system-managed page file, Windows 11 26300. The RX 9070 XT report above found private memory at the end unchanged within its noise; this adds, on another card and route, what the sweep takes by the block counters and what it costs.What I ran:
diagwith diagnostics, Series S, the settings ofscripts\play.ps1, frame capture on, DRED light.The sweep was on for the whole window:
texture_staging_mibis the live staging buffers (about 51 MB on both builds), not the blocks. What the sweep can take is on thememory in blocksandmemory, what holds itlines.What it did:
Did memory come down:
So the sweep does what it says. The two counters fall by about 0.5 GB together, and the adjusted figure agrees. On plain private, its peak and "left to commit" I cannot show a change with three passes.
What it cost:
made so far: N upload bufferson the line nearest 235 s: 22,634 / 21,414 / 18,946 (14.4-17.0 GB) against 521 / 523 / 529 (2.0-2.2 GB). In the window that is 82-98 a second against 0.3-0.4.trim_spare_chunksdrops every kept chunk at each sweep, once a second, and the lists make them again.What this cannot show:
diagbuild, a PNG saved every 8th frame, and the process peaking at 30.6-31.3 GB private on a 32 GB PC.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.