Small hosts of RAM: the L0 caches of ours sized down, the windows cap back by itself (#1520) #1640
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1640
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1640"
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?
@unueberlegt on GitHub · 2026-11-28 22:48 UTC · original
unueberlegt:fix/small-host-ram→main· +184 −27 · 7 files · 1 commits · merged 2026-11-29 08:16 UTCFixes #1520
What it changes
A 16 GB PC reached Windows' 8 GiB shared-memory cap in ~95 s of world load (
0x8007000Eon a host command list): the launcher's under-24-GB auto of85a529bwas lost whenplay-nvidia.ps1became a shim (22c6be2), and the L0 caches added since only know the 32 GiB line (residency::limited_host_ram). This addsresidency::small_host_ram()(< 24 GiB, the threshold85a529bused; RAM that cannot be read is not small) and sizes the L0 defaults by it — every one still overridable by its switch, an explicit value deciding as before:VICTORY_BUFFER_POOL)VICTORY_UPLOAD_POOL_MBVICTORY_EXACT_POOL_MBVICTORY_BUFFERS_AHEADVICTORY_WINDOWS_BAR_MBshadow.rs) rather than the launcher, so every start path gets it (the launcher set it as an environment value, so this is the same cap)While the PC's memory is short, the spares keep a 16 MiB hot floor and all go only when commit is critical: on a 16 GB PC the memory pressure never clears (recovering needs 5 GiB free), and wiping the spares whole at 1 Hz made each second's first copies wait for fresh allocations.
How it was tested
small_host_ram()is false, so the large-host defaults are unchanged (the game loads and plays as before).victory-gpulib suite: 552 passed, 0 failed, 43 ignored (three new tests:scaled_default's table,exact_pool_limit_from's small-host step, andspares_are_trimmed_to_a_hot_floor_while_memory_is_short;exact_pool_limit_adapts_to_ram_and_overridereshaped).🤖 Generated with Claude Code
@eleboucher on GitHub · 2026-11-29 00:07 UTC · original
Tested on a 16 GB PC: it fixes the 2-minute crash here.
Setup. RTX 4070 Ti SUPER 16 GB, Ryzen 7 9800X3D, 16 GB RAM, Windows 11 build 26300. Native 1440p full screen, DLSS off,
VICTORY_BVH_BUILDER=1 VICTORY_ACTIVATE_RAYS=1, diagnostics build. Windows' shared-memory cap on this PC is 7224 MB.Before: main
77df871e.a host command list did not close (0x8007000E), then device removed. That was 7 starts, with and without ray tracing, DRED and the debug layer. The debug layer did not name a command.VICTORY_WINDOWS_BAR_MB=3072set by hand, the same build ran and reached 25.6 fps at 300 s.After: main + this PR (plus #315's compute-wait cap rebased on main, which never fired in these runs). Two cold starts, 10 minutes each, both alive at the end:
did not closelines.crash::tests::memory_at_names_what_an_access_hit,policy::tests::repository_passes_policy).@domx4q on GitHub · 2026-11-29 00:47 UTC · original
A complementary approach, in case it is useful: domx4q/VIctory-NVIDIA@feat/shared-gpu-memory-pressure (one commit on current main, not opened as a PR so as not to compete with this one).
This PR sizes the L0 defaults by the RAM line (< 24 GiB). That branch instead reacts to the budget Windows reports for the shared segment:
residency::pressured()includes it, so everything that already reacts to short memory reacts to it too.VICTORY_ALLOCATOR_TRIMset, an allocator is renewed after 30 s, but only under pressure.the PC's memory shared with the card grew to X MB in use of a budget of Y MB (Z %); the layer keeps …, every 512 MiB of growth, listing scratch, copy sources, send memory, staging and blocks. A failedClosesays it ran out of memory instead of "a command recorded into it was invalid".The pressure would also catch hosts above 24 GiB whose shared use still climbs, and the log line would show which pool grows if a 16 GB report still fails with your defaults.
Testing: on a 62 GB PC (RTX 4090, Linux/Proton) it costs nothing (22.7 fps against 21.6 on main, within noise), and the line peaks at 14.6 GB of a 48 GB budget. I could not reproduce a 16 GB PC. Feel free to take any part of it into this PR.
@unueberlegt on GitHub · 2026-11-29 01:42 UTC · original
Thank you — and the split in pool.rs is exactly the detail a shared-segment pressure would otherwise get wrong: the card's texture blocks answer the card's memory, so they must not go when only the shared part is short.
This PR is its own change and yours is another one: this one sizes defaults once by the RAM line, yours reacts to the live budget Windows reports. Nothing here competes — please open it as its own PR. It covers what this one cannot see: hosts above 24 GiB of RAM whose shared use still climbs, and your log line names the pool that grows if a 16 GB run still fails with these defaults. (eleboucher's run above confirms the sizing itself: two 10-minute runs alive at 600 s where every start died at 120 s before.)
One real overlap to settle when you open it: both PRs add
send::trim()— this one calls it from the sweep with a 16 MiB floor, sized for small hosts; yours keeps 128 MiB because one submission's sends are some 8 to 64 MiB. Your floor is the better fit for a pressure-triggered trim: keep it. Whichever of the two lands second rebases and reconciles.github-bot referenced this pull request2026-11-29 07:26:49 +00:00