Add a laptop preset for NVIDIA PCs with 16 GB of RAM #100

Closed
github-bot wants to merge 1 commit from github-bot/gh-100 into main AGit
Owner

@⁠nidscode on GitHub · 2026-11-27 01:02 UTC · original
nidscode:perf/laptop-preset → main · +207 −5 · 7 files · 1 commits · closed without merging

What

scripts\play.ps1 -Machine laptop: settings for an NVIDIA PC with 16 GB of RAM and a 6–8 GB card, asked for explicitly (-Machine auto is unchanged), plus one small new switch.

  • New: VICTORY_WORKING_SET_MB (crates/victory-loader/src/working_set.rs): a hard ceiling on the game's own working set. run.rs sets it just before the title starts, with SetProcessWorkingSetSizeEx(GetCurrentProcess(), 64 MB, ceiling, QUOTA_LIMITS_HARDWS_MAX_ENABLE | QUOTA_LIMITS_HARDWS_MIN_DISABLE).
    • Off when unset or 0. It refuses values under 1,024 MB, and values whose bytes wouldn't fit (a checked multiplication).
    • It needs no privilege, works in release builds too, and logs working set ceiling N MB: set or the error.
  • No other PR needed: the preset sets no RAM throttle and nothing that touches the title's watchdog.

Why

On 16 GB, the Series S world commits 15–18 GB of private memory, and RAM runs out during the world load: the 4090 settings went down to 3 MB free. Without a ceiling, Windows takes pages from everything, the desktop included. With one, it trims the game's own pages, which come back from the standby and compressed lists without disk reads while they last.

The preset

On top of the existing NVIDIA branch (threads, VICTORY_WAVE_WIDE_ONLY, placed order):

Setting Why
VICTORY_WORKING_SET_MB = RAM − 11.6 GB, at least 3,072 (4,500 on 16 GB) the ceiling above
VICTORY_DSTORAGE_IO=direct game files read past Windows' file cache
VICTORY_INPLACE=2 title buffers in its private memory used in place
VICTORY_WINDOW_KB=64, VICTORY_WINDOW_TAILS=1 windows outside buffers cut on 64 KiB
VICTORY_WINDOWS_BAR_MB=3072, VICTORY_CARD_BUFFERS_MB=256 up to 3 GB of windows in the card's memory (Resizable BAR) instead of RAM; small card copies of buffers leave them room
VICTORY_LEVELS_ON_DEMAND=1 texture levels get the card's memory as they're written
VICTORY_LIST_POOL=0 host lists made new, not used again: a recycled list keeps its command allocator at its peak (driver heap 1.07 / 1.23 GB with recycling, 0.55 / 0.66 GB without; peak private about 0.8 GB lower)
VICTORY_OUTPUT=1920x1080, VICTORY_UPSCALER=6, VICTORY_RENDER_SCALE=0.5 1080p output at half size by the title's own upscaler: the card sits at about 4.2 of its 5.2 GB budget

All of them stay under -Safe, since without them the world load runs out of RAM. Any one can be overridden with -More.

Measurements

Machine: i7-13700H, RTX 3050 6 GB Laptop (budget 5,233 MB, Resizable BAR), 16 GB, Windows 11. Diag build, Series S, windowed, the title's watchdog active. Each run is 240 s, under a guard that stops the game below 400 MB of free RAM, with scripted Enter presses into the story load.

Build and settings Runs Passed the world load In the world World median Ended by
main, -Machine 4090 1 0 – – the guard, at the load (3 MB free)
main + this without VICTORY_LIST_POOL=0 2 2 161 / 157 s (262 / 248 frames) 881 / 716 ms the guard near the end (235 / 240 s)
main + this, -Machine laptop (8446093, with VICTORY_LIST_POOL=0) 2 2 183 / 176 s (265 / 261 frames) 650 / 644 ms the time limit; free RAM ~1 GB on average in the world, never under 298 MB

The game set its own ceiling in both (working set ceiling 4500 MB: set), and nothing outside it touched the working set. docs/laptop-16gb.md also has longer sessions with #96 + #126 (4 of 4 loads), a 720p option measured about a fifth faster, and the dead ends (a 5 GB ceiling, DRED off with the upload queue, less texture room).

Checks

  • Launcher dry runs (play.ps1 with the final call replaced by a dump of the VICTORY_* variables): -Machine laptop gives the set above with the ceiling at 4500; -Machine auto and -Machine 4090 are unchanged; -Safe keeps the set; -More overrides one setting. The PowerShell parser reports 0 errors.
  • cargo test --locked -p xtask --bin xtask switches:: passes (3 passed), and so does working_set::tests::the_working_set_ceiling_is_read_in_megabytes_from_1024, out-of-range cases included.
  • Clippy for victory and victory-loader, with and without diagnostics: no warnings. rustfmt is clean on the new file.

🤖 Generated with Claude Code

**@⁠nidscode** on GitHub · 2026-11-27 01:02 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100) `nidscode:perf/laptop-preset` → `main` · +207 −5 · 7 files · 1 commits · closed without merging ## What `scripts\play.ps1 -Machine laptop`: settings for an NVIDIA PC with **16 GB of RAM** and a 6–8 GB card, asked for explicitly (`-Machine auto` is unchanged), plus one small new switch. - **New: `VICTORY_WORKING_SET_MB`** (`crates/victory-loader/src/working_set.rs`): a hard ceiling on the game's own working set. `run.rs` sets it just before the title starts, with `SetProcessWorkingSetSizeEx(GetCurrentProcess(), 64 MB, ceiling, QUOTA_LIMITS_HARDWS_MAX_ENABLE | QUOTA_LIMITS_HARDWS_MIN_DISABLE)`. - Off when unset or 0. It refuses values under 1,024 MB, and values whose bytes wouldn't fit (a checked multiplication). - It needs no privilege, works in release builds too, and logs `working set ceiling N MB: set` or the error. - **No other PR needed:** the preset sets no RAM throttle and nothing that touches the title's watchdog. ## Why On 16 GB, the Series S world commits 15–18 GB of private memory, and RAM runs out **during the world load**: the 4090 settings went down to 3 MB free. Without a ceiling, Windows takes pages from everything, the desktop included. With one, it trims the game's own pages, which come back from the standby and compressed lists without disk reads while they last. ## The preset On top of the existing NVIDIA branch (threads, `VICTORY_WAVE_WIDE_ONLY`, placed order): | Setting | Why | |---|---| | `VICTORY_WORKING_SET_MB` = RAM − 11.6 GB, at least 3,072 (4,500 on 16 GB) | the ceiling above | | `VICTORY_DSTORAGE_IO=direct` | game files read past Windows' file cache | | `VICTORY_INPLACE=2` | title buffers in its private memory used in place | | `VICTORY_WINDOW_KB=64`, `VICTORY_WINDOW_TAILS=1` | windows outside buffers cut on 64 KiB | | `VICTORY_WINDOWS_BAR_MB=3072`, `VICTORY_CARD_BUFFERS_MB=256` | up to 3 GB of windows in the card's memory (Resizable BAR) instead of RAM; small card copies of buffers leave them room | | `VICTORY_LEVELS_ON_DEMAND=1` | texture levels get the card's memory as they're written | | `VICTORY_LIST_POOL=0` | host lists made new, not used again: a recycled list keeps its command allocator at its peak (driver heap 1.07 / 1.23 GB with recycling, 0.55 / 0.66 GB without; peak private about 0.8 GB lower) | | `VICTORY_OUTPUT=1920x1080`, `VICTORY_UPSCALER=6`, `VICTORY_RENDER_SCALE=0.5` | 1080p output at half size by the title's own upscaler: the card sits at about 4.2 of its 5.2 GB budget | All of them stay under `-Safe`, since without them the world load runs out of RAM. Any one can be overridden with `-More`. ## Measurements Machine: i7-13700H, RTX 3050 6 GB Laptop (budget 5,233 MB, Resizable BAR), 16 GB, Windows 11. Diag build, Series S, windowed, **the title's watchdog active**. Each run is 240 s, under a guard that stops the game below 400 MB of free RAM, with scripted Enter presses into the story load. | Build and settings | Runs | Passed the world load | In the world | World median | Ended by | |---|---|---|---|---|---| | `main`, `-Machine 4090` | 1 | 0 | – | – | the guard, at the load (3 MB free) | | `main` + this without `VICTORY_LIST_POOL=0` | 2 | 2 | 161 / 157 s (262 / 248 frames) | 881 / 716 ms | the guard near the end (235 / 240 s) | | **`main` + this, `-Machine laptop`** (8446093, with `VICTORY_LIST_POOL=0`) | 2 | **2** | 183 / 176 s (265 / 261 frames) | **650 / 644 ms** | **the time limit**; free RAM ~1 GB on average in the world, never under 298 MB | The game set its own ceiling in both (`working set ceiling 4500 MB: set`), and nothing outside it touched the working set. `docs/laptop-16gb.md` also has longer sessions with #96 + #126 (4 of 4 loads), a 720p option measured about a fifth faster, and the dead ends (a 5 GB ceiling, DRED off with the upload queue, less texture room). ## Checks - Launcher dry runs (`play.ps1` with the final call replaced by a dump of the `VICTORY_*` variables): `-Machine laptop` gives the set above with the ceiling at 4500; `-Machine auto` and `-Machine 4090` are unchanged; `-Safe` keeps the set; `-More` overrides one setting. The PowerShell parser reports 0 errors. - `cargo test --locked -p xtask --bin xtask switches::` passes (3 passed), and so does `working_set::tests::the_working_set_ceiling_is_read_in_megabytes_from_1024`, out-of-range cases included. - Clippy for `victory` and `victory-loader`, with and without diagnostics: no warnings. rustfmt is clean on the new file. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
scripts\play.ps1 -Machine laptop, picked on its own on an NVIDIA PC with
less than 24 GB of RAM (-Machine 4090 keeps the previous settings). On
top of the NVIDIA settings it sets what makes the Series S world load
fit in 16 GB: game files past the file cache, title buffers used in
place, 64 KiB windows with tails, up to 3 GB of windows in the card's
memory, small card copies of buffers, levels on demand, a 1080p output
drawn at half size by the title's own upscaler, the RAM throttle's
settings (#96; without it they do nothing) and a pause of the title's
heartbeat watchdog for the throttled load. They stay under -Safe.

VICTORY_WORKING_SET_MB (new, victory-loader working_set): a hard ceiling
on the game's working set, set by the game before the title runs, so
Windows trims the game's own pages instead of the rest of the PC's. The
preset sets it to the RAM less 11.6 GB, at least 3 GB (4,500 on 16 GB).

Measured on an RTX 3050 6 GB laptop with 16 GB (docs/laptop-16gb.md):
with the preset and #96, three runs of 240 s through the world, two of
them with only the game's own ceiling; the 4090 settings ran out of RAM
at the world load.

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

@⁠TaynanGT on GitHub · 2026-11-27 01:28 UTC · original · requested changes

Thanks for testing the in-process working-set cap on the RTX 3050 laptop. I started CI on 1f01096d. Please keep -Machine laptop explicit for now. The auto rule would enable the settings on every NVIDIA PC under 24 GB, while the measurements cover one 16 GB machine. Please also rebase once #96 is ready and include a load test that exercises both changes together.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:28 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#pullrequestreview-6082280801) · **requested changes** Thanks for testing the in-process working-set cap on the RTX 3050 laptop. I started CI on `1f01096d`. Please keep `-Machine laptop` explicit for now. The auto rule would enable the settings on every NVIDIA PC under 24 GB, while the measurements cover one 16 GB machine. Please also rebase once #96 is ready and include a load test that exercises both changes together.
@ -74,0 +109,4 @@
$settings.VICTORY_RAM_FLOOR_MB = '1500'; $settings.VICTORY_RAM_WAIT_MS = '500'
$settings.VICTORY_RAM_WAIT_SHARE_MS = '900'; $settings.VICTORY_RAM_FRAME_WAIT_MS = '1000'
$settings.VICTORY_WINDOWS_BAR_PERCENT = '92'
$settings.VICTORY_POKE = '71B6330:1'
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:28 UTC · original

This applies a build-specific memory write even with -Safe and disables a real hang detector. Please keep the watchdog active in the preset. If a slow load needs extra time, use a bounded, build-checked option gated behind an explicit flag and show a run with the default preset as well.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:28 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#discussion_r4714797157) This applies a build-specific memory write even with `-Safe` and disables a real hang detector. Please keep the watchdog active in the preset. If a slow load needs extra time, use a bounded, build-checked option gated behind an explicit flag and show a run with the default preset as well.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:33 UTC · original

CI reproduced the #96 dependency in both test suites. switches::documented_switches_are_read fails because the five RAM and window-budget switches listed in docs/laptop-16gb.md are read by #96. Clippy passed. Please rerun cargo test --locked -p xtask --bin xtask switches::documented_switches_are_read after rebasing onto the updated throttle. CI failure log

**@⁠TaynanGT** on GitHub · 2026-11-27 01:33 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#issuecomment-7207378701) CI reproduced the #96 dependency in both test suites. `switches::documented_switches_are_read` fails because the five RAM and window-budget switches listed in `docs/laptop-16gb.md` are read by #96. Clippy passed. Please rerun `cargo test --locked -p xtask --bin xtask switches::documented_switches_are_read` after rebasing onto the updated throttle. [CI failure log](https://github.com/TaynanGT/Vice-Tay/actions/runs/45920257478/job/140257087312)
github-bot force-pushed github-bot/gh-100 from 1f01096d50 to eab44c1a5f 2026-11-27 02:27:21 +00:00 Compare
Author
Owner

@⁠nidscode on GitHub · 2026-11-27 02:19 UTC · original
On scripts/play.ps1 line 112 (outdated):

@@ -71,6 +80,37 @@ if ($Machine -eq '4070') {
         $settings.VICTORY_CARD_WINDOWS_MB = '1024'
     }
 }
+if ($Machine -eq 'laptop') {
+    # i7-13700H, RTX 3050 6 GB Laptop GPU, 16 GB (docs/laptop-16gb.md). On top of the NVIDIA
+    # settings above, which the measured runs had: what makes the world load fit in 16 GB. These
+    # stay under -Safe too, since without them the world load runs out of RAM.
+    # Game files read past Windows' file cache, title buffers in its private memory used in
+    # place, windows outside buffers cut on 64 KiB with their tails, and up to 3 GB of them in
+    # the card's memory (Resizable BAR) instead of RAM. The card's own copies of title buffers
+    # get 256 MB, which leaves the card room for those windows.
+    $settings.VICTORY_DSTORAGE_IO = 'direct'; $settings.VICTORY_INPLACE = '2'
+    $settings.VICTORY_WINDOW_KB = '64'; $settings.VICTORY_WINDOW_TAILS = '1'
+    $settings.VICTORY_WINDOWS_BAR_MB = '3072'; $settings.VICTORY_CARD_BUFFERS_MB = '256'
+    $settings.VICTORY_LEVELS_ON_DEMAND = '1'
+    # A ceiling on the game's working set: past it Windows trims the game's own pages, not the
+    # rest of the PC's (16 GB: 4,500 MB, which leaves about 11.6 GB for Windows, the memory the
+    # card shares and the desktop; with no ceiling free RAM ran out before the world loaded).
+    if ($ram) {
+        $settings.VICTORY_WORKING_SET_MB = [string][math]::Max(3072, [int64]($ram / 1MB) - 11624)
+    }
+    # A 1080p output drawn at half size by the title's own upscaler: the card stays at about
+    # 4.2 GB of a 5.2 GB budget.
+    $settings.VICTORY_OUTPUT = '1920x1080'; $settings.VICTORY_UPSCALER = '6'; $settings.VICTORY_RENDER_SCALE = '0.5'
+    # The RAM throttle (pull request #96; these do nothing without it): under 1.5 GB free, new
+    # buffers in RAM and the title's submissions wait a little, and windows may take up to 92 %
+    # of the card's budget. The throttled world load goes 40-50 s without a frame, longer than
+    # the title's heartbeat watchdog allows (30 s), so the poke pauses that watchdog. A real
+    # hang then has to be closed by hand.
+    $settings.VICTORY_RAM_FLOOR_MB = '1500'; $settings.VICTORY_RAM_WAIT_MS = '500'
+    $settings.VICTORY_RAM_WAIT_SHARE_MS = '900'; $settings.VICTORY_RAM_FRAME_WAIT_MS = '1000'
+    $settings.VICTORY_WINDOWS_BAR_PERCENT = '92'
+    $settings.VICTORY_POKE = '71B6330:1'

Done in eab44c1: the preset no longer writes title memory and the watchdog stays on. The bounded, build-checked option is now in #96 (fc74f10) as VICTORY_RAM_KEEP_ALIVE=1, off by default.

  • Bounded: it sets the heartbeat only during the throttle's own waits (VICTORY_RAM_WAIT_MS and VICTORY_RAM_FRAME_WAIT_MS bound each one), so a hang anywhere else still ends the title.
  • Build-checked: it first compares the 1.0.2.1 tick function at +0x2214a90 (C6 05 99 18 FA 04 01 C3) and takes the flag's address from that instruction; another build is left alone, and it says so.

The preset doesn't set it; the doc says to add -More @{VICTORY_RAM_KEEP_ALIVE='1'}. Runs with the default preset (on main + #96 fc74f10 + this):

-Machine laptop Runs Result
default (watchdog on, no keep-alive) 2 both ended by the title's watchdog during the world load: first-chance exception 0xc0000005 at …+0x23cf683 (write 0x0), after about 60 s, with 588–679 MB of RAM free
+ VICTORY_RAM_KEEP_ALIVE=1 2 both ran the full 240 s: 175 / 177 s in the world, 118 / 112 frames, median 1,471 / 1,455 ms
**@⁠nidscode** on GitHub · 2026-11-27 02:19 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#discussion_r4715031359) On `scripts/play.ps1` line 112 (outdated): ```diff @@ -71,6 +80,37 @@ if ($Machine -eq '4070') { $settings.VICTORY_CARD_WINDOWS_MB = '1024' } } +if ($Machine -eq 'laptop') { + # i7-13700H, RTX 3050 6 GB Laptop GPU, 16 GB (docs/laptop-16gb.md). On top of the NVIDIA + # settings above, which the measured runs had: what makes the world load fit in 16 GB. These + # stay under -Safe too, since without them the world load runs out of RAM. + # Game files read past Windows' file cache, title buffers in its private memory used in + # place, windows outside buffers cut on 64 KiB with their tails, and up to 3 GB of them in + # the card's memory (Resizable BAR) instead of RAM. The card's own copies of title buffers + # get 256 MB, which leaves the card room for those windows. + $settings.VICTORY_DSTORAGE_IO = 'direct'; $settings.VICTORY_INPLACE = '2' + $settings.VICTORY_WINDOW_KB = '64'; $settings.VICTORY_WINDOW_TAILS = '1' + $settings.VICTORY_WINDOWS_BAR_MB = '3072'; $settings.VICTORY_CARD_BUFFERS_MB = '256' + $settings.VICTORY_LEVELS_ON_DEMAND = '1' + # A ceiling on the game's working set: past it Windows trims the game's own pages, not the + # rest of the PC's (16 GB: 4,500 MB, which leaves about 11.6 GB for Windows, the memory the + # card shares and the desktop; with no ceiling free RAM ran out before the world loaded). + if ($ram) { + $settings.VICTORY_WORKING_SET_MB = [string][math]::Max(3072, [int64]($ram / 1MB) - 11624) + } + # A 1080p output drawn at half size by the title's own upscaler: the card stays at about + # 4.2 GB of a 5.2 GB budget. + $settings.VICTORY_OUTPUT = '1920x1080'; $settings.VICTORY_UPSCALER = '6'; $settings.VICTORY_RENDER_SCALE = '0.5' + # The RAM throttle (pull request #96; these do nothing without it): under 1.5 GB free, new + # buffers in RAM and the title's submissions wait a little, and windows may take up to 92 % + # of the card's budget. The throttled world load goes 40-50 s without a frame, longer than + # the title's heartbeat watchdog allows (30 s), so the poke pauses that watchdog. A real + # hang then has to be closed by hand. + $settings.VICTORY_RAM_FLOOR_MB = '1500'; $settings.VICTORY_RAM_WAIT_MS = '500' + $settings.VICTORY_RAM_WAIT_SHARE_MS = '900'; $settings.VICTORY_RAM_FRAME_WAIT_MS = '1000' + $settings.VICTORY_WINDOWS_BAR_PERCENT = '92' + $settings.VICTORY_POKE = '71B6330:1' ``` Done in eab44c1: the preset no longer writes title memory and the watchdog stays on. The bounded, build-checked option is now in #96 (fc74f10) as `VICTORY_RAM_KEEP_ALIVE=1`, off by default. - **Bounded:** it sets the heartbeat only during the throttle's own waits (`VICTORY_RAM_WAIT_MS` and `VICTORY_RAM_FRAME_WAIT_MS` bound each one), so a hang anywhere else still ends the title. - **Build-checked:** it first compares the 1.0.2.1 tick function at +0x2214a90 (`C6 05 99 18 FA 04 01 C3`) and takes the flag's address from that instruction; another build is left alone, and it says so. The preset doesn't set it; the doc says to add `-More @{VICTORY_RAM_KEEP_ALIVE='1'}`. Runs with the default preset (on `main` + #96 fc74f10 + this): | `-Machine laptop` | Runs | Result | |---|---|---| | default (watchdog on, no keep-alive) | 2 | **both ended by the title's watchdog during the world load**: `first-chance exception 0xc0000005 at …+0x23cf683 (write 0x0)`, after about 60 s, with 588–679 MB of RAM free | | `+ VICTORY_RAM_KEEP_ALIVE=1` | 2 | both ran the full 240 s: 175 / 177 s in the world, 118 / 112 frames, median 1,471 / 1,455 ms |
Author
Owner

@⁠nidscode on GitHub · 2026-11-27 02:19 UTC · original

Thanks for the review. All three points are addressed in eab44c1:

  1. -Machine laptop is explicit: -Machine auto is back to picking by vendor only, and the README, docs/this-fork.md and docs/laptop-16gb.md say to ask for it.
  2. No title memory writes in the preset (the reply above has the runs with and without the #96 keep-alive).
  3. Rebase: I'll rebase onto main once #96 is in, so the CI failure (switches::documented_switches_are_read for #96's switches named in the doc) goes away, and I'll repeat the load test of both on that tree. The runs above already used main + #96 (fc74f10) + this branch, merged locally.

The working-set ceiling (VICTORY_WORKING_SET_MB) set itself in every run (working set ceiling 4500 MB: set), with nothing outside the game touching the working set.

**@⁠nidscode** on GitHub · 2026-11-27 02:19 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#issuecomment-7208022254) Thanks for the review. All three points are addressed in eab44c1: 1. **`-Machine laptop` is explicit:** `-Machine auto` is back to picking by vendor only, and the README, `docs/this-fork.md` and `docs/laptop-16gb.md` say to ask for it. 2. **No title memory writes in the preset** (the reply above has the runs with and without the #96 keep-alive). 3. **Rebase:** I'll rebase onto `main` once #96 is in, so the CI failure (`switches::documented_switches_are_read` for #96's switches named in the doc) goes away, and I'll repeat the load test of both on that tree. The runs above already used `main` + #96 (fc74f10) + this branch, merged locally. The working-set ceiling (`VICTORY_WORKING_SET_MB`) set itself in every run (`working set ceiling 4500 MB: set`), with nothing outside the game touching the working set.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 02:21 UTC · original
On scripts/play.ps1 line 112 (outdated):

@@ -71,6 +80,37 @@ if ($Machine -eq '4070') {
         $settings.VICTORY_CARD_WINDOWS_MB = '1024'
     }
 }
+if ($Machine -eq 'laptop') {
+    # i7-13700H, RTX 3050 6 GB Laptop GPU, 16 GB (docs/laptop-16gb.md). On top of the NVIDIA
+    # settings above, which the measured runs had: what makes the world load fit in 16 GB. These
+    # stay under -Safe too, since without them the world load runs out of RAM.
+    # Game files read past Windows' file cache, title buffers in its private memory used in
+    # place, windows outside buffers cut on 64 KiB with their tails, and up to 3 GB of them in
+    # the card's memory (Resizable BAR) instead of RAM. The card's own copies of title buffers
+    # get 256 MB, which leaves the card room for those windows.
+    $settings.VICTORY_DSTORAGE_IO = 'direct'; $settings.VICTORY_INPLACE = '2'
+    $settings.VICTORY_WINDOW_KB = '64'; $settings.VICTORY_WINDOW_TAILS = '1'
+    $settings.VICTORY_WINDOWS_BAR_MB = '3072'; $settings.VICTORY_CARD_BUFFERS_MB = '256'
+    $settings.VICTORY_LEVELS_ON_DEMAND = '1'
+    # A ceiling on the game's working set: past it Windows trims the game's own pages, not the
+    # rest of the PC's (16 GB: 4,500 MB, which leaves about 11.6 GB for Windows, the memory the
+    # card shares and the desktop; with no ceiling free RAM ran out before the world loaded).
+    if ($ram) {
+        $settings.VICTORY_WORKING_SET_MB = [string][math]::Max(3072, [int64]($ram / 1MB) - 11624)
+    }
+    # A 1080p output drawn at half size by the title's own upscaler: the card stays at about
+    # 4.2 GB of a 5.2 GB budget.
+    $settings.VICTORY_OUTPUT = '1920x1080'; $settings.VICTORY_UPSCALER = '6'; $settings.VICTORY_RENDER_SCALE = '0.5'
+    # The RAM throttle (pull request #96; these do nothing without it): under 1.5 GB free, new
+    # buffers in RAM and the title's submissions wait a little, and windows may take up to 92 %
+    # of the card's budget. The throttled world load goes 40-50 s without a frame, longer than
+    # the title's heartbeat watchdog allows (30 s), so the poke pauses that watchdog. A real
+    # hang then has to be closed by hand.
+    $settings.VICTORY_RAM_FLOOR_MB = '1500'; $settings.VICTORY_RAM_WAIT_MS = '500'
+    $settings.VICTORY_RAM_WAIT_SHARE_MS = '900'; $settings.VICTORY_RAM_FRAME_WAIT_MS = '1000'
+    $settings.VICTORY_WINDOWS_BAR_PERCENT = '92'
+    $settings.VICTORY_POKE = '71B6330:1'

The new launcher makes the laptop preset explicit and leaves the title watchdog active, which addresses those review points. I queued CI for eab44c1a. The preset still depends on #96. The new parse_mb also needs to reject values that overflow when converted to bytes: mb << 20 can truncate a valid u64 input. Please use checked multiplication and add an out-of-range test.

**@⁠TaynanGT** on GitHub · 2026-11-27 02:21 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#discussion_r4715044005) On `scripts/play.ps1` line 112 (outdated): ```diff @@ -71,6 +80,37 @@ if ($Machine -eq '4070') { $settings.VICTORY_CARD_WINDOWS_MB = '1024' } } +if ($Machine -eq 'laptop') { + # i7-13700H, RTX 3050 6 GB Laptop GPU, 16 GB (docs/laptop-16gb.md). On top of the NVIDIA + # settings above, which the measured runs had: what makes the world load fit in 16 GB. These + # stay under -Safe too, since without them the world load runs out of RAM. + # Game files read past Windows' file cache, title buffers in its private memory used in + # place, windows outside buffers cut on 64 KiB with their tails, and up to 3 GB of them in + # the card's memory (Resizable BAR) instead of RAM. The card's own copies of title buffers + # get 256 MB, which leaves the card room for those windows. + $settings.VICTORY_DSTORAGE_IO = 'direct'; $settings.VICTORY_INPLACE = '2' + $settings.VICTORY_WINDOW_KB = '64'; $settings.VICTORY_WINDOW_TAILS = '1' + $settings.VICTORY_WINDOWS_BAR_MB = '3072'; $settings.VICTORY_CARD_BUFFERS_MB = '256' + $settings.VICTORY_LEVELS_ON_DEMAND = '1' + # A ceiling on the game's working set: past it Windows trims the game's own pages, not the + # rest of the PC's (16 GB: 4,500 MB, which leaves about 11.6 GB for Windows, the memory the + # card shares and the desktop; with no ceiling free RAM ran out before the world loaded). + if ($ram) { + $settings.VICTORY_WORKING_SET_MB = [string][math]::Max(3072, [int64]($ram / 1MB) - 11624) + } + # A 1080p output drawn at half size by the title's own upscaler: the card stays at about + # 4.2 GB of a 5.2 GB budget. + $settings.VICTORY_OUTPUT = '1920x1080'; $settings.VICTORY_UPSCALER = '6'; $settings.VICTORY_RENDER_SCALE = '0.5' + # The RAM throttle (pull request #96; these do nothing without it): under 1.5 GB free, new + # buffers in RAM and the title's submissions wait a little, and windows may take up to 92 % + # of the card's budget. The throttled world load goes 40-50 s without a frame, longer than + # the title's heartbeat watchdog allows (30 s), so the poke pauses that watchdog. A real + # hang then has to be closed by hand. + $settings.VICTORY_RAM_FLOOR_MB = '1500'; $settings.VICTORY_RAM_WAIT_MS = '500' + $settings.VICTORY_RAM_WAIT_SHARE_MS = '900'; $settings.VICTORY_RAM_FRAME_WAIT_MS = '1000' + $settings.VICTORY_WINDOWS_BAR_PERCENT = '92' + $settings.VICTORY_POKE = '71B6330:1' ``` The new launcher makes the laptop preset explicit and leaves the title watchdog active, which addresses those review points. I queued CI for `eab44c1a`. The preset still depends on #96. The new `parse_mb` also needs to reject values that overflow when converted to bytes: `mb << 20` can truncate a valid `u64` input. Please use checked multiplication and add an out-of-range test.
github-bot force-pushed github-bot/gh-100 from eab44c1a5f to 4d7861c51c 2026-11-27 02:56:59 +00:00 Compare
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 02:59 UTC · original

Thanks, @⁠nidscode. On 4d7861c, the existing working-set test passed. A launcher dry run with 15.7 GiB and an NVIDIA adapter also confirmed that auto leaves the ceiling unset, -Machine laptop sets 4,500 MiB, and -More overrides the throttle floor under -Safe.

I combined this head with #96's d5c5d61 locally. That resolves the five throttle switches in the docs check, which now fails only because VICTORY_RAM_KEEP_ALIVE is still documented after its removal from #96. Please drop that instruction from the docs and launcher, and carry over the checked MiB conversion and overflow test from my earlier review. Then I'd try the same guarded Series S load with VICTORY_RAM_FRAME_WAIT_MS=0, leaving the buffer throttle and working-set ceiling in place. That would tell us whether the buffer throttle alone can get past the load with the watchdog active. Both reported runs with the current preset and the watchdog active ended during loading.

**@⁠TaynanGT** on GitHub · 2026-11-27 02:59 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#issuecomment-7208602781) Thanks, @⁠nidscode. On `4d7861c`, the existing working-set test passed. A launcher dry run with 15.7 GiB and an NVIDIA adapter also confirmed that `auto` leaves the ceiling unset, `-Machine laptop` sets 4,500 MiB, and `-More` overrides the throttle floor under `-Safe`. I combined this head with #96's `d5c5d61` locally. That resolves the five throttle switches in the docs check, which now fails only because `VICTORY_RAM_KEEP_ALIVE` is still documented after its removal from #96. Please drop that instruction from the docs and launcher, and carry over the checked MiB conversion and overflow test from my earlier review. Then I'd try the same guarded Series S load with `VICTORY_RAM_FRAME_WAIT_MS=0`, leaving the buffer throttle and working-set ceiling in place. That would tell us whether the buffer throttle alone can get past the load with the watchdog active. Both reported runs with the current preset and the watchdog active ended during loading.
github-bot force-pushed github-bot/gh-100 from 4d7861c51c to 4c9a0a86d4 2026-11-27 03:42:57 +00:00 Compare
Author
Owner

@⁠nidscode on GitHub · 2026-11-27 03:41 UTC · original
On scripts/play.ps1 line 112 (outdated):

@@ -71,6 +80,37 @@ if ($Machine -eq '4070') {
         $settings.VICTORY_CARD_WINDOWS_MB = '1024'
     }
 }
+if ($Machine -eq 'laptop') {
+    # i7-13700H, RTX 3050 6 GB Laptop GPU, 16 GB (docs/laptop-16gb.md). On top of the NVIDIA
+    # settings above, which the measured runs had: what makes the world load fit in 16 GB. These
+    # stay under -Safe too, since without them the world load runs out of RAM.
+    # Game files read past Windows' file cache, title buffers in its private memory used in
+    # place, windows outside buffers cut on 64 KiB with their tails, and up to 3 GB of them in
+    # the card's memory (Resizable BAR) instead of RAM. The card's own copies of title buffers
+    # get 256 MB, which leaves the card room for those windows.
+    $settings.VICTORY_DSTORAGE_IO = 'direct'; $settings.VICTORY_INPLACE = '2'
+    $settings.VICTORY_WINDOW_KB = '64'; $settings.VICTORY_WINDOW_TAILS = '1'
+    $settings.VICTORY_WINDOWS_BAR_MB = '3072'; $settings.VICTORY_CARD_BUFFERS_MB = '256'
+    $settings.VICTORY_LEVELS_ON_DEMAND = '1'
+    # A ceiling on the game's working set: past it Windows trims the game's own pages, not the
+    # rest of the PC's (16 GB: 4,500 MB, which leaves about 11.6 GB for Windows, the memory the
+    # card shares and the desktop; with no ceiling free RAM ran out before the world loaded).
+    if ($ram) {
+        $settings.VICTORY_WORKING_SET_MB = [string][math]::Max(3072, [int64]($ram / 1MB) - 11624)
+    }
+    # A 1080p output drawn at half size by the title's own upscaler: the card stays at about
+    # 4.2 GB of a 5.2 GB budget.
+    $settings.VICTORY_OUTPUT = '1920x1080'; $settings.VICTORY_UPSCALER = '6'; $settings.VICTORY_RENDER_SCALE = '0.5'
+    # The RAM throttle (pull request #96; these do nothing without it): under 1.5 GB free, new
+    # buffers in RAM and the title's submissions wait a little, and windows may take up to 92 %
+    # of the card's budget. The throttled world load goes 40-50 s without a frame, longer than
+    # the title's heartbeat watchdog allows (30 s), so the poke pauses that watchdog. A real
+    # hang then has to be closed by hand.
+    $settings.VICTORY_RAM_FLOOR_MB = '1500'; $settings.VICTORY_RAM_WAIT_MS = '500'
+    $settings.VICTORY_RAM_WAIT_SHARE_MS = '900'; $settings.VICTORY_RAM_FRAME_WAIT_MS = '1000'
+    $settings.VICTORY_WINDOWS_BAR_PERCENT = '92'
+    $settings.VICTORY_POKE = '71B6330:1'

Fixed in 4c9a0a8: parse_mb converts with checked_mul(1 << 20) and also refuses bytes that wouldn't fit in a usize (the value goes to SetProcessWorkingSetSizeEx). The test now covers u64::MAX, (u64::MAX >> 20) + 1 (refused), u64::MAX >> 20 (the largest accepted) and a number past u64.

**@⁠nidscode** on GitHub · 2026-11-27 03:41 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#discussion_r4715450903) On `scripts/play.ps1` line 112 (outdated): ```diff @@ -71,6 +80,37 @@ if ($Machine -eq '4070') { $settings.VICTORY_CARD_WINDOWS_MB = '1024' } } +if ($Machine -eq 'laptop') { + # i7-13700H, RTX 3050 6 GB Laptop GPU, 16 GB (docs/laptop-16gb.md). On top of the NVIDIA + # settings above, which the measured runs had: what makes the world load fit in 16 GB. These + # stay under -Safe too, since without them the world load runs out of RAM. + # Game files read past Windows' file cache, title buffers in its private memory used in + # place, windows outside buffers cut on 64 KiB with their tails, and up to 3 GB of them in + # the card's memory (Resizable BAR) instead of RAM. The card's own copies of title buffers + # get 256 MB, which leaves the card room for those windows. + $settings.VICTORY_DSTORAGE_IO = 'direct'; $settings.VICTORY_INPLACE = '2' + $settings.VICTORY_WINDOW_KB = '64'; $settings.VICTORY_WINDOW_TAILS = '1' + $settings.VICTORY_WINDOWS_BAR_MB = '3072'; $settings.VICTORY_CARD_BUFFERS_MB = '256' + $settings.VICTORY_LEVELS_ON_DEMAND = '1' + # A ceiling on the game's working set: past it Windows trims the game's own pages, not the + # rest of the PC's (16 GB: 4,500 MB, which leaves about 11.6 GB for Windows, the memory the + # card shares and the desktop; with no ceiling free RAM ran out before the world loaded). + if ($ram) { + $settings.VICTORY_WORKING_SET_MB = [string][math]::Max(3072, [int64]($ram / 1MB) - 11624) + } + # A 1080p output drawn at half size by the title's own upscaler: the card stays at about + # 4.2 GB of a 5.2 GB budget. + $settings.VICTORY_OUTPUT = '1920x1080'; $settings.VICTORY_UPSCALER = '6'; $settings.VICTORY_RENDER_SCALE = '0.5' + # The RAM throttle (pull request #96; these do nothing without it): under 1.5 GB free, new + # buffers in RAM and the title's submissions wait a little, and windows may take up to 92 % + # of the card's budget. The throttled world load goes 40-50 s without a frame, longer than + # the title's heartbeat watchdog allows (30 s), so the poke pauses that watchdog. A real + # hang then has to be closed by hand. + $settings.VICTORY_RAM_FLOOR_MB = '1500'; $settings.VICTORY_RAM_WAIT_MS = '500' + $settings.VICTORY_RAM_WAIT_SHARE_MS = '900'; $settings.VICTORY_RAM_FRAME_WAIT_MS = '1000' + $settings.VICTORY_WINDOWS_BAR_PERCENT = '92' + $settings.VICTORY_POKE = '71B6330:1' ``` Fixed in 4c9a0a8: `parse_mb` converts with `checked_mul(1 << 20)` and also refuses bytes that wouldn't fit in a `usize` (the value goes to `SetProcessWorkingSetSizeEx`). The test now covers `u64::MAX`, `(u64::MAX >> 20) + 1` (refused), `u64::MAX >> 20` (the largest accepted) and a number past `u64`.
Author
Owner

@⁠nidscode on GitHub · 2026-11-27 03:41 UTC · original

4c9a0a8 addresses the #120 hold. #100 no longer depends on #96: the preset sets no RAM throttle and nothing that touches the title's watchdog, and the doc no longer names the throttle's or the keep-alive's switches. cargo test --locked -p xtask --bin xtask switches:: passes on main + this (3 passed), and clippy has no warnings for victory and victory-loader, with and without diagnostics.

Low-RAM load retest with the watchdog active, built from main + 4c9a0a8 only, -Machine laptop, 240 s runs on the 16 GB laptop:

Run Passed the world load In the world Frames Median Ended by
1 yes 161 s 262 881 ms my guard at 235 s (95 MB free)
2 yes 157 s 248 716 ms my guard at 240 s (320 MB free)

The ceiling set itself in both (working set ceiling 4500 MB: set). For comparison, with #96's throttle and the watchdog on, 0 of 6 loads passed: submission waits of 1,000, 300 and even 0 ms, since the buffer waits alone hold the title's main loop too long. The throttle without #126 doesn't help on this title. The doc's "Longer sessions" section says that and points to #96 + #126 (4 of 4 loads passed with both).

**@⁠nidscode** on GitHub · 2026-11-27 03:41 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#issuecomment-7209198749) 4c9a0a8 addresses the #120 hold. **#100 no longer depends on #96**: the preset sets no RAM throttle and nothing that touches the title's watchdog, and the doc no longer names the throttle's or the keep-alive's switches. `cargo test --locked -p xtask --bin xtask switches::` passes on `main` + this (3 passed), and clippy has no warnings for `victory` and `victory-loader`, with and without diagnostics. **Low-RAM load retest with the watchdog active,** built from `main` + 4c9a0a8 only, `-Machine laptop`, 240 s runs on the 16 GB laptop: | Run | Passed the world load | In the world | Frames | Median | Ended by | |---|---|---|---|---|---| | 1 | yes | 161 s | 262 | 881 ms | my guard at 235 s (95 MB free) | | 2 | yes | 157 s | 248 | 716 ms | my guard at 240 s (320 MB free) | The ceiling set itself in both (`working set ceiling 4500 MB: set`). For comparison, with #96's throttle and the watchdog on, **0 of 6** loads passed: submission waits of 1,000, 300 and even 0 ms, since the buffer waits alone hold the title's main loop too long. The throttle without #126 doesn't help on this title. The doc's "Longer sessions" section says that and points to #96 + #126 (4 of 4 loads passed with both).
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 04:02 UTC · original

Thanks for testing the laptop preset on its own, @⁠nidscode. I approved CI for 4c9a0a8, and the full Windows workflow passed. I checked that the MiB conversion now rejects overflow. The two successful loads with the watchdog active are the useful result here. The 716 and 881 ms frame medians still belong in the notes so readers can judge what to expect after loading. CI run

**@⁠TaynanGT** on GitHub · 2026-11-27 04:02 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#issuecomment-7209465008) Thanks for testing the laptop preset on its own, @⁠nidscode. I approved CI for `4c9a0a8`, and the full Windows workflow passed. I checked that the MiB conversion now rejects overflow. The two successful loads with the watchdog active are the useful result here. The 716 and 881 ms frame medians still belong in the notes so readers can judge what to expect after loading. [CI run](https://github.com/TaynanGT/Vice-Tay/actions/runs/45935643585)
github-bot closed this pull request 2026-11-27 04:21:23 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 04:20 UTC · original

Thanks for making the laptop preset independent, @⁠nidscode. It’s on main through #145 with your authorship preserved. The full Windows workflow passed. The PowerShell smoke tests confirmed that -Machine laptop applies the 4,500 MiB cap with -Safe and accepts a -More override. The docs keep your two guarded runs and their frame times together.

**@⁠TaynanGT** on GitHub · 2026-11-27 04:20 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#issuecomment-7209715958) Thanks for making the laptop preset independent, @⁠nidscode. It’s on `main` through [#145](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/145) with your authorship preserved. The full Windows workflow passed. The PowerShell smoke tests confirmed that `-Machine laptop` applies the 4,500 MiB cap with `-Safe` and accepts a `-More` override. The docs keep your two guarded runs and their frame times together.
Author
Owner

@⁠nidscode on GitHub · 2026-11-27 05:51 UTC · original

One more change, in 8446093: the preset now also sets VICTORY_LIST_POOL=0. I found it by measuring where the process heap goes on the 16 GB laptop, hooking the heap calls in the import tables of nvwgf2umx.dll, d3d12core.dll and ucrtbase.dll (local diagnostics only, not in any PR):

  • Everything is in one heap: 3.5–3.7 GB committed. The layer's own Rust allocations are about 1.4 GB, the NVIDIA driver holds 1.07–1.31 GB live in 510,000–610,000 allocations and keeps growing in the world, ucrtbase about 120 MB, d3d12core about 34 MB.
  • The retire queues drain on time, so the layer isn't leaking objects.
  • Cutting shared buffers from placed blocks doesn't reduce the driver's memory. I tried it, and it cost free RAM to block slack, so it isn't proposed.
  • VICTORY_LIST_POOL=0 halves the driver's heap: 545 / 657 MB against 1,067 / 1,226 MB. A recycled host list keeps its command allocator at the most any recording into it ever took, and pooled lists serve many title lists. Peak private memory fell by about 0.8 GB.

On main + this branch, -Machine laptop, watchdog on:

Runs Ended by World Frames Median Free RAM in the world
list pool on 2 my guard near 4 min 161 / 157 s 262 / 248 881 / 716 ms 213 / 413 MB on average, lows of 0 MB
list pool off 2 the time limit 183 / 176 s 265 / 261 650 / 644 ms 1,032 / 1,117 MB on average, never under 298 MB

The switches check still passes (cargo test --locked -p xtask --bin xtask switches::documented_switches_are_read).

**@⁠nidscode** on GitHub · 2026-11-27 05:51 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#issuecomment-7211003901) One more change, in 8446093: the preset now also sets `VICTORY_LIST_POOL=0`. I found it by measuring where the process heap goes on the 16 GB laptop, hooking the heap calls in the import tables of `nvwgf2umx.dll`, `d3d12core.dll` and `ucrtbase.dll` (local diagnostics only, not in any PR): - **Everything is in one heap:** 3.5–3.7 GB committed. The layer's own Rust allocations are about 1.4 GB, the NVIDIA driver holds 1.07–1.31 GB live in 510,000–610,000 allocations and keeps growing in the world, `ucrtbase` about 120 MB, `d3d12core` about 34 MB. - **The retire queues drain on time,** so the layer isn't leaking objects. - **Cutting shared buffers from placed blocks doesn't reduce the driver's memory.** I tried it, and it cost free RAM to block slack, so it isn't proposed. - **`VICTORY_LIST_POOL=0` halves the driver's heap:** 545 / 657 MB against 1,067 / 1,226 MB. A recycled host list keeps its command allocator at the most any recording into it ever took, and pooled lists serve many title lists. Peak private memory fell by about 0.8 GB. On `main` + this branch, `-Machine laptop`, watchdog on: | | Runs | Ended by | World | Frames | Median | Free RAM in the world | |---|---|---|---|---|---|---| | list pool on | 2 | my guard near 4 min | 161 / 157 s | 262 / 248 | 881 / 716 ms | 213 / 413 MB on average, lows of 0 MB | | **list pool off** | 2 | **the time limit** | 183 / 176 s | 265 / 261 | **650 / 644 ms** | **1,032 / 1,117 MB on average, never under 298 MB** | The switches check still passes (`cargo test --locked -p xtask --bin xtask switches::documented_switches_are_read`).
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 05:53 UTC · original

Thanks for tracing the driver heap and alternating the runs, @⁠nidscode. On that laptop, list pooling off cut the measured NVIDIA heap from 1,067–1,226 MB to 545–657 MB. Both runs reached the time limit, with at least 298 MB free in the world and 644–650 ms median frame times.

GitHub’s closed #100 still points to 4c9a0a8. The laptop preset already merged via #145 accepts this control on current main.

-Machine laptop -More @{VICTORY_LIST_POOL='0'}
**@⁠TaynanGT** on GitHub · 2026-11-27 05:53 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/100#issuecomment-7211036214) Thanks for tracing the driver heap and alternating the runs, @⁠nidscode. On that laptop, list pooling off cut the measured NVIDIA heap from 1,067–1,226 MB to 545–657 MB. Both runs reached the time limit, with at least 298 MB free in the world and 644–650 ms median frame times. GitHub’s closed #100 still points to `4c9a0a8`. The laptop preset already merged via #145 accepts this control on current `main`. ```powershell -Machine laptop -More @{VICTORY_LIST_POOL='0'} ```

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.