Add a laptop preset for NVIDIA PCs with 16 GB of RAM #100
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!100
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-100"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@nidscode on GitHub · 2026-11-27 01:02 UTC · original
nidscode:perf/laptop-preset→main· +207 −5 · 7 files · 1 commits · closed without mergingWhat
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 autois unchanged), plus one small new switch.VICTORY_WORKING_SET_MB(crates/victory-loader/src/working_set.rs): a hard ceiling on the game's own working set.run.rssets it just before the title starts, withSetProcessWorkingSetSizeEx(GetCurrentProcess(), 64 MB, ceiling, QUOTA_LIMITS_HARDWS_MAX_ENABLE | QUOTA_LIMITS_HARDWS_MIN_DISABLE).working set ceiling N MB: setor the error.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):VICTORY_WORKING_SET_MB= RAM − 11.6 GB, at least 3,072 (4,500 on 16 GB)VICTORY_DSTORAGE_IO=directVICTORY_INPLACE=2VICTORY_WINDOW_KB=64,VICTORY_WINDOW_TAILS=1VICTORY_WINDOWS_BAR_MB=3072,VICTORY_CARD_BUFFERS_MB=256VICTORY_LEVELS_ON_DEMAND=1VICTORY_LIST_POOL=0VICTORY_OUTPUT=1920x1080,VICTORY_UPSCALER=6,VICTORY_RENDER_SCALE=0.5All 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.
main,-Machine 4090main+ this withoutVICTORY_LIST_POOL=0main+ this,-Machine laptop(8446093, withVICTORY_LIST_POOL=0)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.mdalso 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
play.ps1with the final call replaced by a dump of theVICTORY_*variables):-Machine laptopgives the set above with the ceiling at 4500;-Machine autoand-Machine 4090are unchanged;-Safekeeps the set;-Moreoverrides one setting. The PowerShell parser reports 0 errors.cargo test --locked -p xtask --bin xtask switches::passes (3 passed), and so doesworking_set::tests::the_working_set_ceiling_is_read_in_megabytes_from_1024, out-of-range cases included.victoryandvictory-loader, with and without diagnostics: no warnings. rustfmt is clean on the new file.🤖 Generated with Claude Code
@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 laptopexplicit 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'@TaynanGT on GitHub · 2026-11-27 01:28 UTC · original
This applies a build-specific memory write even with
-Safeand 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:33 UTC · original
CI reproduced the #96 dependency in both test suites.
switches::documented_switches_are_readfails because the five RAM and window-budget switches listed indocs/laptop-16gb.mdare read by #96. Clippy passed. Please reruncargo test --locked -p xtask --bin xtask switches::documented_switches_are_readafter rebasing onto the updated throttle. CI failure log1f01096d50toeab44c1a5f@nidscode on GitHub · 2026-11-27 02:19 UTC · original
On
scripts/play.ps1line 112 (outdated):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) asVICTORY_RAM_KEEP_ALIVE=1, off by default.VICTORY_RAM_WAIT_MSandVICTORY_RAM_FRAME_WAIT_MSbound each one), so a hang anywhere else still ends the title.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 (onmain+ #96fc74f10+ this):-Machine laptopfirst-chance exception 0xc0000005 at …+0x23cf683 (write 0x0), after about 60 s, with 588–679 MB of RAM free+ VICTORY_RAM_KEEP_ALIVE=1@nidscode on GitHub · 2026-11-27 02:19 UTC · original
Thanks for the review. All three points are addressed in
eab44c1:-Machine laptopis explicit:-Machine autois back to picking by vendor only, and the README,docs/this-fork.mdanddocs/laptop-16gb.mdsay to ask for it.mainonce #96 is in, so the CI failure (switches::documented_switches_are_readfor #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 usedmain+ #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.@TaynanGT on GitHub · 2026-11-27 02:21 UTC · original
On
scripts/play.ps1line 112 (outdated):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 newparse_mbalso needs to reject values that overflow when converted to bytes:mb << 20can truncate a validu64input. Please use checked multiplication and add an out-of-range test.eab44c1a5fto4d7861c51c@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 thatautoleaves the ceiling unset,-Machine laptopsets 4,500 MiB, and-Moreoverrides the throttle floor under-Safe.I combined this head with #96's
d5c5d61locally. That resolves the five throttle switches in the docs check, which now fails only becauseVICTORY_RAM_KEEP_ALIVEis 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 withVICTORY_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.4d7861c51cto4c9a0a86d4@nidscode on GitHub · 2026-11-27 03:41 UTC · original
On
scripts/play.ps1line 112 (outdated):Fixed in
4c9a0a8:parse_mbconverts withchecked_mul(1 << 20)and also refuses bytes that wouldn't fit in ausize(the value goes toSetProcessWorkingSetSizeEx). The test now coversu64::MAX,(u64::MAX >> 20) + 1(refused),u64::MAX >> 20(the largest accepted) and a number pastu64.@nidscode on GitHub · 2026-11-27 03:41 UTC · original
4c9a0a8addresses 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 onmain+ this (3 passed), and clippy has no warnings forvictoryandvictory-loader, with and without diagnostics.Low-RAM load retest with the watchdog active, built from
main+4c9a0a8only,-Machine laptop, 240 s runs on the 16 GB laptop: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).@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:20 UTC · original
Thanks for making the laptop preset independent, @nidscode. It’s on
mainthrough #145 with your authorship preserved. The full Windows workflow passed. The PowerShell smoke tests confirmed that-Machine laptopapplies the 4,500 MiB cap with-Safeand accepts a-Moreoverride. The docs keep your two guarded runs and their frame times together.@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 ofnvwgf2umx.dll,d3d12core.dllanducrtbase.dll(local diagnostics only, not in any PR):ucrtbaseabout 120 MB,d3d12coreabout 34 MB.VICTORY_LIST_POOL=0halves 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:The switches check still passes (
cargo test --locked -p xtask --bin xtask switches::documented_switches_are_read).@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 currentmain.Pull request closed