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

Merged
bihanikeshav merged 1 commit from upstream-pr/321 into main 2026-11-29 08:16:59 +00:00
bihanikeshav commented 2026-11-27 20:59:02 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by bihanikeshav on 2026-11-27T20:59:02Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5533020241 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/321). Originally posted by [bihanikeshav](https://github.com/bihanikeshav) on 2026-11-27T20:59:02Z. --- ## 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)
harrisotiropoulos-jpg commented 2026-11-27 23:00:41 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by harrisotiropoulos-jpg on 2026-11-27T23:00:41Z.


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

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7229798519 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/321#issuecomment-7229798519). Originally posted by [harrisotiropoulos-jpg](https://github.com/harrisotiropoulos-jpg) on 2026-11-27T23:00:41Z. --- 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)
bihanikeshav commented 2026-11-28 18:01:06 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by bihanikeshav on 2026-11-28T18:01:06Z.


Thanks, that's a very useful data point. On our 16 GB / RTX 5060 laptop we've also been seeing texture flicker since these switches went on, and hadn't tied it to them. We're re-running with the 4 MiB grid to confirm. If it's the cause, I'll put this PR back to draft until the copies of memory that lies in more than one window are kept up to date.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7243464514 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/321#issuecomment-7243464514). Originally posted by [bihanikeshav](https://github.com/bihanikeshav) on 2026-11-28T18:01:06Z. --- Thanks, that's a very useful data point. On our 16 GB / RTX 5060 laptop we've also been seeing texture flicker since these switches went on, and hadn't tied it to them. We're re-running with the 4 MiB grid to confirm. If it's the cause, I'll put this PR back to draft until the copies of memory that lies in more than one window are kept up to date.
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!321
No description provided.