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

Merged
Indy2l merged 1 commit from upstream-pr/6 into main 2026-11-26 17:10:34 +00:00
Indy2l commented 2026-11-26 16:54:45 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Indy2l on 2026-11-26T16:54:45Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5514051343 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/6). Originally posted by [Indy2l](https://github.com/Indy2l) on 2026-11-26T16:54:45Z. --- ## 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)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!6
No description provided.