fix(scripts): windows in card memory the CPU maps, for 16 GB PCs #6

Manually merged
github merged 1 commit from github-bot/gh-6 into main 2026-11-26 17:14:16 +00:00 AGit
Owner

@⁠Indy2l on GitHub · 2026-11-26 16:54 UTC · original
Indy2l:fix/16gb-windows-bar → main · +14 −0 · 2 files · 1 commits · merged 2026-11-26 17:10 UTC

Problem

On a PC with 16 GB of RAM, every run of play-nvidia.ps1 ended about a minute into the world. The test machine was an RTX 3060 12 GB with an i5-12400F, running Series S at 540p on driver 32.0.16.2140. A host list failed to close or be made with 0x8007000E, and one second later the driver faulted (nvwgf2umx, a read at 0xc in CopyTextureRegion).

The limit it hits is the card's shared memory, not the commit limit. Windows lets a card share at most half the RAM, about 8 GB here. Shared use reached 7.5 GB while the card's own memory still had about 5 GB free, and the commit limit (64 GB) was far off. The memory line puts about two-thirds of that shared memory in windows of title memory outside buffers (3.7 GB at the crash). The 64 GB machine these settings were measured on can share about 32 GB, so it never gets there.

Change

  • play-nvidia.ps1: sets VICTORY_WINDOWS_BAR_MB=3072, so windows go to card memory the CPU maps (D3D12_HEAP_TYPE_GPU_UPLOAD) while the card has room.
  • Without a resizable BAR: mapped_card_buffer returns None and windows stay where they were, so nothing changes.
  • README.md: a note under "What to expect" on 16 GB PCs, how to check for a resizable BAR, and the stutters that remain.

Validation

Same machine and settings, with copystat memory lines, sampled shared and dedicated GPU memory, and fps from the frame-rate line:

Default script With VICTORY_WINDOWS_BAR_MB=3072
Time in the world about 1 min, then 0x8007000E 5+ min, no crash, in 4 runs
Shared memory rising to 7.5 GB flat at about 4.4–4.6 GB
Card's own memory about 6 GB about 8.7–9 GB of a 10.9 GB budget
fps in the world 1.6–3 about 10–12 typical, 8.6–9.2 median over whole runs

I checked that the script still parses. No code changes are involved.

Other measurements from the same machine

These might be useful, since issues are off:

  • VICTORY_LATE_WAIT_LISTS=64 changed nothing: same growth, same crash. The ~1,900 host lists alive are mostly the title's own, made as the world loads.
  • VICTORY_WINDOW_KB=1024 with VICTORY_WINDOW_TAILS=1 is not worth it. At the same point in the world it saved about 6% of window memory (3.0 vs 3.2 GB), because the smaller windows overlap: 3.0 GB of windows over 1.9 GB of title memory. It cost about 10 ms more preparing per frame (copies 46 → 60 MB per frame), and median fps went from 8.6 to 7.0. That answers the open question in shadow.rs window().
  • Windows past the card's 80% line fall back to shared memory. With textures filling the card to about 81%, windows grew to 4.8 GB over a 7-minute run, and shared memory to 6.45 GB. A long session could still reach the cap.
  • The remaining stutters are paging. 5-second windows under 5 fps read a median of about 20,000 pages per second back from the paging file. Windows at 8 fps or more read about 2,400. In the slowest frames (2–2.5 s), the card is about 96% idle because the title had not submitted.

🤖 Generated with Claude Code

**@⁠Indy2l** on GitHub · 2026-11-26 16:54 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/6) `Indy2l:fix/16gb-windows-bar` → `main` · +14 −0 · 2 files · 1 commits · merged 2026-11-26 17:10 UTC ## Problem On a PC with 16 GB of RAM, every run of `play-nvidia.ps1` ended about a minute into the world. The test machine was an RTX 3060 12 GB with an i5-12400F, running Series S at 540p on driver 32.0.16.2140. A host list failed to close or be made with `0x8007000E`, and one second later the driver faulted (`nvwgf2umx`, a read at `0xc` in `CopyTextureRegion`). The limit it hits is the card's shared memory, not the commit limit. Windows lets a card share at most half the RAM, about 8 GB here. Shared use reached 7.5 GB while the card's own memory still had about 5 GB free, and the commit limit (64 GB) was far off. The memory line puts about two-thirds of that shared memory in windows of title memory outside buffers (3.7 GB at the crash). The 64 GB machine these settings were measured on can share about 32 GB, so it never gets there. ## Change - **`play-nvidia.ps1`:** sets `VICTORY_WINDOWS_BAR_MB=3072`, so windows go to card memory the CPU maps (`D3D12_HEAP_TYPE_GPU_UPLOAD`) while the card has room. - **Without a resizable BAR:** `mapped_card_buffer` returns `None` and windows stay where they were, so nothing changes. - **`README.md`:** a note under "What to expect" on 16 GB PCs, how to check for a resizable BAR, and the stutters that remain. ## Validation Same machine and settings, with `copystat` memory lines, sampled shared and dedicated GPU memory, and fps from the frame-rate line: | | Default script | With `VICTORY_WINDOWS_BAR_MB=3072` | |---|---|---| | Time in the world | about 1 min, then `0x8007000E` | 5+ min, no crash, in 4 runs | | Shared memory | rising to 7.5 GB | flat at about 4.4–4.6 GB | | Card's own memory | about 6 GB | about 8.7–9 GB of a 10.9 GB budget | | fps in the world | 1.6–3 | about 10–12 typical, 8.6–9.2 median over whole runs | I checked that the script still parses. No code changes are involved. ## Other measurements from the same machine These might be useful, since issues are off: - **`VICTORY_LATE_WAIT_LISTS=64`** changed nothing: same growth, same crash. The ~1,900 host lists alive are mostly the title's own, made as the world loads. - **`VICTORY_WINDOW_KB=1024` with `VICTORY_WINDOW_TAILS=1`** is not worth it. At the same point in the world it saved about 6% of window memory (3.0 vs 3.2 GB), because the smaller windows overlap: 3.0 GB of windows over 1.9 GB of title memory. It cost about 10 ms more preparing per frame (copies 46 → 60 MB per frame), and median fps went from 8.6 to 7.0. That answers the open question in `shadow.rs` `window()`. - **Windows past the card's 80% line** fall back to shared memory. With textures filling the card to about 81%, windows grew to 4.8 GB over a 7-minute run, and shared memory to 6.45 GB. A long session could still reach the cap. - **The remaining stutters are paging.** 5-second windows under 5 fps read a median of about 20,000 pages per second back from the paging file. Windows at 8 fps or more read about 2,400. In the slowest frames (2–2.5 s), the card is about 96% idle because the title had not submitted. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On a PC with 16 GB of RAM (RTX 3060 12 GB, i5-12400F, Series S at 540p)
every run with play-nvidia.ps1 ended a minute or so into the world: the
card's shared memory (the PC's, capped by Windows at half the RAM) reached
7.5 GB, a host list failed to close or be made with 0x8007000E, and the
driver faulted in CopyTextureRegion. About two thirds of that memory were
the windows of title memory outside buffers.

VICTORY_WINDOWS_BAR_MB=3072 puts them in card memory the CPU maps
(D3D12_HEAP_TYPE_GPU_UPLOAD) while the card has room. Same machine: no
crash in 5+ minute runs, shared memory flat at about 4.4 GB, 10-12 fps in
the world instead of 1.6-3. Without a resizable BAR, mapped_card_buffer
returns None and windows stay where they were.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 16:57:10 +00:00
github manually merged commit ea94970beb into main 2026-11-26 17:14:16 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.