You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gpu: scale snapshot, scratch, and command-list pools from system RAM - #47
One note from our 32 GB std::alloc::rust_oom report in #771: for ullTotalPhys >= 30 GiB, scaling spare_most up (128 -> 256 MiB) and snapshot_pool_cap up (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 GiB systems looks solid.
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 bfff043 to clamp all three RAM-scaled pool caps dynamically against remaining Windows commit charge (MEMORYSTATUSEX.ullAvailPageFile) via available_commit_bytes():
ullAvailPageFile >= 8 GiB (or unknown): full RAM-scaled tier (spare_most up to 256 MiB, idle_most up to 512 MiB, snapshot_pool_cap up to 1024 MiB on >= 30 GiB hosts).
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).
Systems with <= 16 GiB RAM 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 against fxceless/main (a26859f).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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.