Launcher: finer host-copy windows on PCs with 16 GB of RAM or less (6.0 -> 5.2 GB of the PC's memory held by the card) #321

Open
github-bot wants to merge 1 commit from github-bot/gh-321 into main AGit
Owner

@⁠bihanikeshav on GitHub · 2026-11-27 20:59 UTC · original
bihanikeshav:lowspec-windows → main · +10 −0 · 1 files · 1 commits · open

What

scripts/play-foxhound.ps1 sets VICTORY_WINDOW_KB=1024 and VICTORY_WINDOW_TAILS=1 when the PC has 16 GB of RAM or less. Both switches are already in main (shadow.rs); no Rust changes. -More @{VICTORY_WINDOW_KB='4096'} gives back the 4 MiB grid.

Why

On a 16 GB PC the host copies of title memory are the biggest part of the PC's memory the card holds, and Windows pages the rest of the process out. Most of those copies are windows on the 4 MiB grid, and most of those are asks without a length (root views), which keep the whole 4 MiB cell from its start. With 1 MiB windows and tails, a root view's window begins at its own 256 KiB step.

Measured

RTX 5060 Laptop (8 GB, 32-lane waves), Core Ultra 7 255HX, 16 GB RAM, Windows 11. main 0cef07e9 plus #76, #81, #88, #63, #69. play-foxhound.ps1 -SeriesS -Dlss off, the same scripted menu input in every run, the prison's day room.

Diagnostics build, memory line, about five minutes in:

before after
windows outside buffers 3,400 MB 2,598 MB
of them asked for without a length 2,732 MB 980 MB
host copies of title memory 4,206 MB 3,404 MB
the card's share of the PC's memory 6.0 GB 5.2 GB
private memory 20.9 GB 19.9 GB
fps, median / slowest tenth of seconds 14.0 / 3.7 14.4 / 11.9

Release build: median 16.0 -> 16.4 fps, private memory 20.3 -> 19.3 GB. No visual change seen.

The finer grid costs more copies per frame on bigger machines (a 256 KiB grid doubled copies on another tree), so the launcher sets it only at 16 GB or less, where paging costs more than the copies.

🤖 Generated with Claude Code

**@⁠bihanikeshav** on GitHub · 2026-11-27 20:59 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/321) `bihanikeshav:lowspec-windows` → `main` · +10 −0 · 1 files · 1 commits · open ## What `scripts/play-foxhound.ps1` sets `VICTORY_WINDOW_KB=1024` and `VICTORY_WINDOW_TAILS=1` when the PC has 16 GB of RAM or less. Both switches are already in `main` (`shadow.rs`); no Rust changes. `-More @{VICTORY_WINDOW_KB='4096'}` gives back the 4 MiB grid. ## Why On a 16 GB PC the host copies of title memory are the biggest part of the PC's memory the card holds, and Windows pages the rest of the process out. Most of those copies are windows on the 4 MiB grid, and most of those are asks without a length (root views), which keep the whole 4 MiB cell from its start. With 1 MiB windows and tails, a root view's window begins at its own 256 KiB step. ## Measured RTX 5060 Laptop (8 GB, 32-lane waves), Core Ultra 7 255HX, 16 GB RAM, Windows 11. `main` 0cef07e9 plus #76, #81, #88, #63, #69. `play-foxhound.ps1 -SeriesS -Dlss off`, the same scripted menu input in every run, the prison's day room. Diagnostics build, memory line, about five minutes in: | | before | after | |---|---|---| | windows outside buffers | 3,400 MB | 2,598 MB | | of them asked for without a length | 2,732 MB | 980 MB | | host copies of title memory | 4,206 MB | 3,404 MB | | the card's share of the PC's memory | 6.0 GB | 5.2 GB | | private memory | 20.9 GB | 19.9 GB | | fps, median / slowest tenth of seconds | 14.0 / 3.7 | 14.4 / 11.9 | Release build: median 16.0 -> 16.4 fps, private memory 20.3 -> 19.3 GB. No visual change seen. The finer grid costs more copies per frame on bigger machines (a 256 KiB grid doubled copies on another tree), so the launcher sets it only at 16 GB or less, where paging costs more than the copies. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
VICTORY_WINDOW_KB=1024 and VICTORY_WINDOW_TAILS=1 when the PC has 16 GB of
RAM or less. Measured on an RTX 5060 Laptop (8 GB) with 16 GB of RAM: the
windows 3,400 -> 2,598 MB, the card's share of the PC's memory 6.0 -> 5.2 GB,
slowest tenth of seconds 3.7 -> 11.9 fps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 21:01:20 +00:00
Author
Owner

@⁠harrisotiropoulos-jpg on GitHub · 2026-11-27 23:00 UTC · original

A data point from a different configuration, with the same two switches (VICTORY_WINDOW_KB=1024, VICTORY_WINDOW_TAILS=1), set by hand through -More (this PR's launcher change would not set them here, since this PC has 32 GB).

Setup: RTX 4080 (16 GB), 32 GB RAM, Windows 11, driver 621.x. main 29d8dbf plus #76, #81, #86, #25, #33, #34, #39, #58, #63, #84, #101. Diagnostics build, Series X at 1440p, DLSS Quality (preset K), DLSS Frame Generation 2x, 30 fps cap, open-world gameplay. One run of about 5 minutes with each setting, in the same area.

What happened with the switches on: textures did not load correctly, and some objects flickered with random colours. With the default 4 MiB grid, the same build and route looked right.

Memory line, about five minutes in (12 one-second fps samples each):

4 MiB grid (default) 1 MiB + tails
windows outside buffers 785, 3,260 MB 2,280, 3,376 MB
host copies of title memory 4,236 MB 4,353 MB
private memory 28,473 MB 27,284 MB
of it in memory 22,126 MB 22,484 MB
copies per frame 14.5 ms, 61 MB 13.6 ms, 63 MB
fps 22.5 20.9

So on this configuration the windows did not shrink. There were about 3x as many windows, holding slightly more memory, and the picture broke. This is one pair of runs in moving gameplay, so the private-memory difference is within run-to-run noise. The broken textures and coloured flicker were not subtle, though.

The corruption suggests that, with finer windows, some copies are not brought up to date (the same title memory asked for with different ranges then lies in more than one window, as the window() comment in shadow.rs notes). Your measurements were on Series S with DLSS off, in one room, so it may only show up with Series X, DLSS or frame generation, or outdoors. It would be worth a check on those before this goes on by default, even for 16 GB PCs only.

🤖 Generated with Claude Code

**@⁠harrisotiropoulos-jpg** on GitHub · 2026-11-27 23:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/321#issuecomment-7229798519) A data point from a different configuration, with the same two switches (`VICTORY_WINDOW_KB=1024`, `VICTORY_WINDOW_TAILS=1`), set by hand through `-More` (this PR's launcher change would not set them here, since this PC has 32 GB). **Setup:** RTX 4080 (16 GB), 32 GB RAM, Windows 11, driver 621.x. `main` 29d8dbf plus #76, #81, #86, #25, #33, #34, #39, #58, #63, #84, #101. Diagnostics build, Series X at 1440p, DLSS Quality (preset K), DLSS Frame Generation 2x, 30 fps cap, open-world gameplay. One run of about 5 minutes with each setting, in the same area. **What happened with the switches on:** textures did not load correctly, and some objects flickered with random colours. With the default 4 MiB grid, the same build and route looked right. **Memory line, about five minutes in (12 one-second fps samples each):** | | 4 MiB grid (default) | 1 MiB + tails | |---|---|---| | windows outside buffers | 785, 3,260 MB | **2,280, 3,376 MB** | | host copies of title memory | 4,236 MB | 4,353 MB | | private memory | 28,473 MB | 27,284 MB | | of it in memory | 22,126 MB | 22,484 MB | | copies per frame | 14.5 ms, 61 MB | 13.6 ms, 63 MB | | fps | 22.5 | 20.9 | So on this configuration the windows did not shrink. There were about 3x as many windows, holding slightly more memory, and the picture broke. This is one pair of runs in moving gameplay, so the private-memory difference is within run-to-run noise. The broken textures and coloured flicker were not subtle, though. The corruption suggests that, with finer windows, some copies are not brought up to date (the same title memory asked for with different ranges then lies in more than one window, as the `window()` comment in `shadow.rs` notes). Your measurements were on Series S with DLSS off, in one room, so it may only show up with Series X, DLSS or frame generation, or outdoors. It would be worth a check on those before this goes on by default, even for 16 GB PCs only. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/321/head:github-bot/gh-321'
git switch 'github-bot/gh-321'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-321'
git switch 'github-bot/gh-321'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-321'
git switch 'github-bot/gh-321'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-321'
git switch 'main'
git merge --squash 'github-bot/gh-321'
git switch 'main'
git merge --ff-only 'github-bot/gh-321'
git switch 'main'
git merge 'github-bot/gh-321'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.