gpu: scale snapshot, scratch, and command-list pools from system RAM #47
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/fxceless--victory-fork!47
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-47"
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?
@fever308 on GitHub · 2026-11-24 20:54 UTC · original
fever308:feat/auto-ram-pool-limits→main· +168 −13 · 4 files · 3 commits · openSummary
Using
>= 30 GiBfor the 32 GB tier accounts for firmware/hardware reservations where WindowsullTotalPhysreports ~31.7–31.9 GiB.Evidence
128 MiBspare scratch,128lists /256 MiBidle list memory,512 MiBsnapshot pool) across all host RAM capacities.After:
cargo test -p victory-gpu scales_with_ram: 3 passed (spare_most_scales_with_ram,idle_most_scales_with_ram_and_cores,snapshot_pool_cap_scales_with_ram), 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings(default and--all-features): clean.Merge Danger
Door: two-way
Only changes retention ceilings for reusable pools;
VICTORY_SCRATCH_POOL=0andVICTORY_LIST_POOL=0remain unchanged.Blast Radius: Pools
Changes peak retained host RAM for scratch chunks, idle host command lists, and shadow snapshot buffers.
@im-a-cat on GitHub · 2026-11-25 07:21 UTC · original
Tested cleanly against current
fxceless/main(a26859f) on Windows 11 (Ryzen 5 5600, 32 GB RAM, RTX 4060 Ti 16 GB):a26859f(4 files, +111/-11).cargo test --workspace --locked) when stacked with #461, #190, #500, and #592 (includingspare_most_scales_with_ramandsnapshot_pool_cap_scales_with_ram).One note from our 32 GB
std::alloc::rust_oomreport in #771: forullTotalPhys >= 30 GiB, scalingspare_mostup (128 -> 256 MiB) andsnapshot_pool_capup (512 -> 1024 MiB) is keyed off total installed RAM rather than remaining Windows commit charge (ullAvailPageFile), so 32 GB hosts with tight pagefile headroom can hold more pooled memory across transitions. Scaling pools down on<= 16 GiBsystems looks solid.@fever308 on GitHub · 2026-11-25 07:27 UTC · original
Thank you for testing this on Windows 11 and for flagging the 32 GB
std::alloc::rust_oom/ tight pagefile headroom issue (#771),@im-a-cat— that's a great catch!Pushed
bfff043to clamp all three RAM-scaled pool caps dynamically against remaining Windows commit charge (MEMORYSTATUSEX.ullAvailPageFile) viaavailable_commit_bytes():ullAvailPageFile >= 8 GiB(or unknown): full RAM-scaled tier (spare_mostup to 256 MiB,idle_mostup to 512 MiB,snapshot_pool_capup to 1024 MiB on>= 30 GiBhosts).4 GiB <= ullAvailPageFile < 8 GiB: clamped to the baseline caps (128 MiB/256 MiB/512 MiB), so 32 GB hosts with tight pagefile headroom do not grow pooled memory past baseline during transitions.ullAvailPageFile < 4 GiB: clamped down to the low-memory floor (64 MiB/128 MiB/128 MiB).<= 16 GiBRAM still never scale above their lower RAM tier even with a large pagefile (by_ram.min(by_commit)).Verified locally with
cargo clippy -p victory-gpu --all-targets(default and--all-features,-D warnings), unit tests covering all commit-headroom clamping tiers (spare_most_scales_with_ram,idle_most_scales_with_ram_and_cores,snapshot_pool_cap_scales_with_ram), and a clean merge check againstfxceless/main(a26859f).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.