v2026.11.29.01: memory guard puts off every compile during the world load (0.1 fps): it ignores pagefile growth #2385

Closed
opened 2026-11-29 12:36:44 +00:00 by Brillanc3 · 3 comments
Brillanc3 commented 2026-11-29 12:36:44 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Brillanc3 on 2026-11-29T12:36:44Z.


What you see

Since v2026.11.29.01 the game drops to 0.1-0.2 fps as soon as the world loads (title screen and menus run at 144 fps). v2026.11.28.03 played on the same PC.

The log at that moment is full of:

WARN victory_gpu::memguard: memory guard: a compile is put off (it is made again later; the process goes on) ... free_physical_mb=7466 free_commit_mb=3929 reason="the commit left would fall under its floor"
WARN victory_gpu::pipeline::refused: host pipeline failed (logged once per key) ... hr=0x8007000e ... (0x8007000E)
WARN victory_gpu::pipeline::make: host pipeline not made: the PC is short of memory (memory guard); it is tried again 1000 ms later, its draws are dropped until then

Each 0x8007000e comes in the same millisecond as a memory-guard refusal: it is the guard's own memguard::refusal(), not the driver running out of memory.

Cause. memguard::figures_now() (added in 60a08ef) reads the commit left from ullAvailPageFile, the commit limit of the moment. With a system-managed pagefile that limit stays a few GB above the commit while the world loads (the process goes from ~11 to ~25 GB commit in 15 s), so the guard sits at its 4096 MB floor and keeps putting compiles off. residency.rs already counts what the pagefiles can still grow by (available_commit, #339) and in the same run reports available_commit_mib=85115, but the memory guard does not use it.

Run memory-guard put off 0x8007000e refused fps in the world
release v2026.11.29.01, --res 4k 16 (logged, powers of two) 1,340 0.1-0.2
main + #2060, 3440x1440 16 1,354 0.1-0.2
same, second run 16 1,325 0.1-0.2
same, VICTORY_COMMIT_FLOOR_MB=0 0 commit refusals 26 1-3 (world draws again)
same, guard counting pagefile growth (PR to follow) 6 (physical soft floor only), free_commit_mb=80761 30 5-18

VICTORY_COMPILE_MEMORY=0 set in the environment does not help as a workaround: victory play clears every VICTORY_* variable not in KEPT. VICTORY_COMMIT_FLOOR_MB=0 in victory-settings.txt works.

Even with the fix the game stays well under the 144 fps of the menus here (free physical memory falls to ~1.6 GB with ~29 GB committed). That part may be #2129 or memory pressure and is not claimed to be fixed.

GPU and driver

NVIDIA GeForce RTX 5080 16 GB, driver 617.42

CPU, RAM and Windows version

32 GB RAM, Windows 11 Pro 10.0.26200, pagefile system-managed on C: (commit limit 46.5 GB at start)

VIctory release or commit

v2026.11.29.01 (release), and main at 829188e built from source (with #2060 for the 21:9 start crash)

Settings

Series X, play --res 1440 --dlss quality --fg-type auto --fps 1000 (3440x1440 monitor), also --res 4k

Logs

Available on request (they contain local paths).

Are you working on a fix?

Yes, PR to follow.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6678782777 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2385). Originally posted by [Brillanc3](https://github.com/Brillanc3) on 2026-11-29T12:36:44Z. --- ### What you see Since v2026.11.29.01 the game drops to **0.1-0.2 fps** as soon as the world loads (title screen and menus run at 144 fps). v2026.11.28.03 played on the same PC. The log at that moment is full of: ``` WARN victory_gpu::memguard: memory guard: a compile is put off (it is made again later; the process goes on) ... free_physical_mb=7466 free_commit_mb=3929 reason="the commit left would fall under its floor" WARN victory_gpu::pipeline::refused: host pipeline failed (logged once per key) ... hr=0x8007000e ... (0x8007000E) WARN victory_gpu::pipeline::make: host pipeline not made: the PC is short of memory (memory guard); it is tried again 1000 ms later, its draws are dropped until then ``` Each `0x8007000e` comes in the same millisecond as a memory-guard refusal: it is the guard's own `memguard::refusal()`, not the driver running out of memory. **Cause.** `memguard::figures_now()` (added in 60a08ef) reads the commit left from `ullAvailPageFile`, the commit limit *of the moment*. With a system-managed pagefile that limit stays a few GB above the commit while the world loads (the process goes from ~11 to ~25 GB commit in 15 s), so the guard sits at its 4096 MB floor and keeps putting compiles off. `residency.rs` already counts what the pagefiles can still grow by (`available_commit`, #339) and in the same run reports `available_commit_mib=85115`, but the memory guard does not use it. | Run | memory-guard put off | `0x8007000e` refused | fps in the world | |---|---|---|---| | release v2026.11.29.01, `--res 4k` | 16 (logged, powers of two) | 1,340 | 0.1-0.2 | | main + #2060, 3440x1440 | 16 | 1,354 | 0.1-0.2 | | same, second run | 16 | 1,325 | 0.1-0.2 | | same, `VICTORY_COMMIT_FLOOR_MB=0` | 0 commit refusals | 26 | 1-3 (world draws again) | | same, guard counting pagefile growth (PR to follow) | 6 (physical soft floor only), `free_commit_mb=80761` | 30 | 5-18 | `VICTORY_COMPILE_MEMORY=0` set in the environment does not help as a workaround: `victory play` clears every `VICTORY_*` variable not in `KEPT`. `VICTORY_COMMIT_FLOOR_MB=0` in `victory-settings.txt` works. Even with the fix the game stays well under the 144 fps of the menus here (free physical memory falls to ~1.6 GB with ~29 GB committed). That part may be #2129 or memory pressure and is not claimed to be fixed. ### GPU and driver NVIDIA GeForce RTX 5080 16 GB, driver 617.42 ### CPU, RAM and Windows version 32 GB RAM, Windows 11 Pro 10.0.26200, pagefile system-managed on C: (commit limit 46.5 GB at start) ### VIctory release or commit v2026.11.29.01 (release), and main at 829188e built from source (with #2060 for the 21:9 start crash) ### Settings Series X, `play --res 1440 --dlss quality --fg-type auto --fps 1000` (3440x1440 monitor), also `--res 4k` ### Logs Available on request (they contain local paths). ### Are you working on a fix? Yes, PR to follow.
trustno1-coder commented 2026-11-29 16:00:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-29T16:00:54Z.


Update: v2026.11.29.01 lost some GPU memory handling (it was removed along with another change), so memory can climb until pipelines fail with 0x8007000E and the game sits on a black or frozen picture at ~0.2 fps. The next build puts that handling back. Until then, --set VICTORY_WAVE_FOLDED=0 also helps, and If you need it playable right now, v2026.11.28.03 is the last build without these regressions.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7258547198 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2385#issuecomment-7258547198). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-29T16:00:54Z. --- Update: v2026.11.29.01 lost some GPU memory handling (it was removed along with another change), so memory can climb until pipelines fail with 0x8007000E and the game sits on a black or frozen picture at ~0.2 fps. The next build puts that handling back. Until then, `--set VICTORY_WAVE_FOLDED=0` also helps, and If you need it playable right now, v2026.11.28.03 is the last build without these regressions.
AimLogin commented 2026-11-29 20:34:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by AimLogin on 2026-11-29T20:34:29Z.


A second variant of this, which goes through the memory guard's physical-RAM gate rather than the commit floor, ended in a crash here. It was a cold host pipeline library on f889bb07 (+ #2853 + #2265, nothing in memguard/compilemem changed), Windows 11, RTX 4060 Ti 16 GB, 32 GB RAM, driver 621.01, DLSS Quality, a new game into the intro.

Measured from the run's own log and per-second counters:

  • Free physical RAM sat at 95 MB to 1.4 GB for the last ~2 minutes of the world load. Commit headroom stayed at about 9 GB (limit 64.7 GB, no pagefile growth), so the commit floor was not the problem.
  • Below the 1 GB VICTORY_MEMORY_FLOOR_MB soft floor the guard runs driver compiles one at a time. Compile throughput fell to about 2/s, and to 0.27/s at the end. The ungated cold 9ce3cf9e run made about 11/s on the same PC.
  • The pipeline queue grew to 982. There were 940 compile waits (966 s in total) and 220 put-offs. Frames took about 3 s each, with 700-2,500 draws/dispatches dropped per frame ("its draws are dropped until then").
  • The last frame came about 29 s before the fault, and the title's own hang watchdog ended the process. The log shows 0xc0000005 at +0x23cf683, write 0x0, the watchdog trap described in docs/crash-addresses.md. We keep VICTORY_TITLE_WATCHDOG=1.
  • No allocation failed anywhere: no xmem, heap, upload or driver refusal line. Every 0x8007000e was the guard's own refusal.
  • The library was never saved during the run, so the next start would be just as cold. Only 38 pipelines were in host-pipelines.bin (656,968 bytes, last saved 3 min before the crash), because it is saved when the workers drain and VICTORY_LIBRARY_SAVE_TIMER_S is off by default.

So on a cold start the free-RAM gate alone can stall the render path long enough for the title watchdog to fire, even with plenty of commit. Two observations that may help whichever fix lands here (#2717, #2743, #2578):

  • a compile needed by the current frame could be admitted ahead of prefetch under the soft floor, with only the commit floor guarding real exhaustion;
  • a periodic library save keeps long cold loads from starting from zero again.

We are testing VICTORY_MEMORY_FLOOR_MB=0 (commit floor kept) plus VICTORY_LIBRARY_SAVE_TIMER_S=30 next. That is not measured yet; I'll add the result here.

Analysis was AI-assisted; numbers are from our run's logs.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7262188944 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2385#issuecomment-7262188944). Originally posted by [AimLogin](https://github.com/AimLogin) on 2026-11-29T20:34:29Z. --- A second variant of this, which goes through the memory guard's *physical-RAM* gate rather than the commit floor, ended in a crash here. It was a cold host pipeline library on f889bb07 (+ #2853 + #2265, nothing in memguard/compilemem changed), Windows 11, RTX 4060 Ti 16 GB, 32 GB RAM, driver 621.01, DLSS Quality, a new game into the intro. Measured from the run's own log and per-second counters: - Free physical RAM sat at **95 MB to 1.4 GB** for the last ~2 minutes of the world load. Commit headroom stayed at about **9 GB** (limit 64.7 GB, no pagefile growth), so the commit floor was not the problem. - Below the 1 GB `VICTORY_MEMORY_FLOOR_MB` soft floor the guard runs driver compiles **one at a time**. Compile throughput fell to about 2/s, and to 0.27/s at the end. The ungated cold 9ce3cf9e run made about 11/s on the same PC. - The pipeline queue grew to **982**. There were 940 compile waits (966 s in total) and 220 put-offs. Frames took about 3 s each, with **700-2,500 draws/dispatches dropped per frame** ("its draws are dropped until then"). - The last frame came about 29 s before the fault, and the title's own hang watchdog ended the process. The log shows `0xc0000005` at `+0x23cf683`, `write 0x0`, the watchdog trap described in `docs/crash-addresses.md`. We keep `VICTORY_TITLE_WATCHDOG=1`. - No allocation failed anywhere: no xmem, heap, upload or driver refusal line. Every `0x8007000e` was the guard's own refusal. - The library was never saved during the run, so the next start would be just as cold. Only 38 pipelines were in `host-pipelines.bin` (656,968 bytes, last saved 3 min before the crash), because it is saved when the workers drain and `VICTORY_LIBRARY_SAVE_TIMER_S` is off by default. So on a cold start the free-RAM gate alone can stall the render path long enough for the title watchdog to fire, even with plenty of commit. Two observations that may help whichever fix lands here (#2717, #2743, #2578): - a compile needed by the current frame could be admitted ahead of prefetch under the soft floor, with only the commit floor guarding real exhaustion; - a periodic library save keeps long cold loads from starting from zero again. We are testing `VICTORY_MEMORY_FLOOR_MB=0` (commit floor kept) plus `VICTORY_LIBRARY_SAVE_TIMER_S=30` next. That is **not measured yet**; I'll add the result here. _Analysis was AI-assisted; numbers are from our run's logs._
AimLogin commented 2026-11-29 20:52:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by AimLogin on 2026-11-29T20:52:20Z.


Follow-up to my comment above, with the test I said I'd run.

The retry used VICTORY_MEMORY_FLOOR_MB=0 (commit floor kept) plus VICTORY_LIBRARY_SAVE_TIMER_S=30 on the same build and PC. It also ended in the title's watchdog trap (+0x23cf683), about 100 s in. The memory guard was not involved this time:

  • no compile waited or was put off, and 8–10 compiles ran at once;
  • free RAM was 1.3–1.8 GB and commit headroom 13–14 GB;
  • no allocation failed.

So lifting the free-RAM floor removes the first run's mechanism, but it is not enough on its own.

The cause this time was the inline compute wait (from 8d5f456f, capped by 88244e8d):

  • One list-translation thread compiled a single heavy compute pipeline inline for about 31 s. No submission or present went out meanwhile, and the watchdog fired about 0.1 s before that compile returned.
  • The 3 s per-frame cap is checked only before an inline make starts, and charged after it returns, so a single make is unbounded.
  • The same program took about 6 s in a cold 9ce3cf9e run on this PC. Its world-load group compiled 3–7× slower here, with every core busy compiling (8 workers, the driver's threads and the translation threads). That contention is our reading, not a measurement of the cause.

Two corrections to my first comment:

  1. "The next start would be just as cold" was wrong. The driver's own shader cache survived the crash: pipelines that took 2 s or more in the first run took about 0 s in the second.
  2. VICTORY_LIBRARY_SAVE_TIMER_S=30 saved nothing. Under host memory pressure save() switches to a 600 s interval, so every tick returned early.

Suggestion:

  • bound or avoid inline compute compiles on the translation threads;
  • give a compile that blocks a dispatch priority over prefetch compiles while it waits;
  • do not drop the dispatch.

We're working on a patch along those lines and will open a PR if it holds up in our runs.

Analysis was AI-assisted; numbers are from our run logs (code locations read in f889bb07).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7262423455 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2385#issuecomment-7262423455). Originally posted by [AimLogin](https://github.com/AimLogin) on 2026-11-29T20:52:20Z. --- Follow-up to my comment above, with the test I said I'd run. The retry used `VICTORY_MEMORY_FLOOR_MB=0` (commit floor kept) plus `VICTORY_LIBRARY_SAVE_TIMER_S=30` on the same build and PC. It **also** ended in the title's watchdog trap (`+0x23cf683`), about 100 s in. The memory guard was not involved this time: - no compile waited or was put off, and 8–10 compiles ran at once; - free RAM was 1.3–1.8 GB and commit headroom 13–14 GB; - no allocation failed. So lifting the free-RAM floor removes the first run's mechanism, but it is not enough on its own. **The cause this time** was the inline compute wait (from 8d5f456f, capped by 88244e8d): - One list-translation thread compiled a single heavy compute pipeline inline for about 31 s. No submission or present went out meanwhile, and the watchdog fired about 0.1 s before that compile returned. - The 3 s per-frame cap is checked only *before* an inline make starts, and charged after it returns, so a single make is unbounded. - The same program took about 6 s in a cold 9ce3cf9e run on this PC. Its world-load group compiled 3–7× slower here, with every core busy compiling (8 workers, the driver's threads and the translation threads). That contention is our reading, not a measurement of the cause. **Two corrections to my first comment:** 1. "The next start would be just as cold" was wrong. The driver's own shader cache survived the crash: pipelines that took 2 s or more in the first run took about 0 s in the second. 2. `VICTORY_LIBRARY_SAVE_TIMER_S=30` saved nothing. Under host memory pressure `save()` switches to a 600 s interval, so every tick returned early. **Suggestion:** - bound or avoid inline compute compiles on the translation threads; - give a compile that blocks a dispatch priority over prefetch compiles while it waits; - do not drop the dispatch. We're working on a patch along those lines and will open a PR if it holds up in our runs. _Analysis was AI-assisted; numbers are from our run logs (code locations read in f889bb07)._
Sign in to join this conversation.
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#2385
No description provided.