Skip to content

Compile memory admission off by default (VICTORY_COMPILE_MEMORY=1 turns it on) - #3347

Open
Lyrnc wants to merge 1 commit into
trustno1-coder:mainfrom
Lyrnc:perf/regression-compilemem
Open

Lyrnc wants to merge 1 commit into
trustno1-coder:mainfrom
Lyrnc:perf/regression-compilemem

Conversation

@Lyrnc

@Lyrnc Lyrnc commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #2385 and #2308. Part of #2319 (the 0.1 fps stall, not its slower warm frame); the same stall is reported on v2026.11.29.03 in #2942.

What it changes

What was wrong. v2026.11.29.01 turned on the compile memory admission from #1625 (60a08ef). In the world the title commits 22-27 GB, so on a 32 GB PC the commit Windows can still promise sits between 0.3 and 3 GB, under the guard's 4096 MB commit floor (VICTORY_COMMIT_FLOOR_MB), and free physical memory sits under its 1024 MB soft floor (VICTORY_MEMORY_FLOOR_MB). In a cold start (driver pipeline cache deleted) on 829188e, 1,337 compiles were put off after waiting and only 108 were started in 300 s. 1,272 pipelines were recorded as failed with 0x8007000E. Frames took 5 or 10 s (0.1-0.2 fps), and the loading screen never left: no frame reached 2,500 draws. With a warm pipeline cache the same build plays at 23.5 fps, so the stall hits a first start, and any start after a driver update or a translator change.

The commit figure is not where allocations fail: Windows grows a system-managed page file when commit nears its limit. With the admission off, the same cold start went down to 428 MB of free commit and 216 MB of free physical memory. It made 1,747 compiles, up to 15 at once, and had no 0x8007000E at all. v2026.11.28.03, which has no admission, went down to 345 MB of free commit, also with none.

What this does. compilemem::on() is true only for VICTORY_COMPILE_MEMORY=1; unset (or anything else) leaves the admission out. Compiles are still measured and learned, and the 5 s compile memory: line is still logged, so the figures stay in every log. =1 brings the admission back with its floors unchanged. The module notes say why. One file, +14/-5.

Why not count page file growth instead (#2392, #2717). Both keep the admission on and count what the page files can still grow by as commit left, as residency does since #339. On this PC that clears the commit floor (75-76 GB left to commit), but the soft floor of free physical memory still holds compiles to one at a time, and a compile on a thread other than the pipeline workers is put off after waiting 1 s. In their cold runs 1,254 and 1,411 compiles waited to start (2,203 s and 2,525 s of waiting in all), 332 and 477 were put off, and 138 and 153 pipelines failed with 0x8007000E: 0.2 fps, the same as without them. dough29's Linux report on #2319 describes the same stall from the physical floor.

Trade-off. The admission was written for ptxas fatal: Memory allocation failure, with a dozen workers compiling at once (#1625, RTX 5070). With it off by default, that crash can come back on a PC whose page file cannot grow (fixed size, or a full drive). VICTORY_COMPILE_MEMORY=1 is the way back there. I have not reproduced that crash here.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): RTX 5080 16 GB, Ryzen 7 9800X3D, 32 GB RAM, Windows 11 26200, system-managed page file. Series S, 1440p output, DLSS Quality, frame generation off, ray tracing off (VICTORY_BVH_BUILDER=0).
  • Method: a script restores the same save, presses Enter until the world draws, then the player stands still. 300 s per run, with its own home, data and cache folder for each build. The figure is the median of the 5 s frame lines with more than 2,500 draws, leaving out the first 30 s after the first such line. Cold: the driver pipeline cache (pipelines folder) is deleted before the run. Warm: the second run on that build's own cache. The four 829188e-based builds ran with exactly the same switches; v2026.11.28.03 is the release with its own launcher defaults.
Build Cold fps Warm fps Cold: compiles started / put off Cold: pipelines failed 0x8007000E
v2026.11.28.03 (no admission) 26.4 25.5 not gated 0
829188e (v2026.11.29.01) 0.1-0.2, world never drawn 23.5 108 / 1,337 1,272
829188e + this change 23.2 23.8 1,747 / 0 0
829188e + #2392 0.2 23.0 1,076 / 332 138
829188e + #2717 0.2 23.2 1,168 / 477 153

Checked for overlap

AI use

Claude Code (Claude Opus 5.5) wrote the change, ran the A/B runs above (the run script and the log parsing are its own), read the cause out of the compile memory and memory guard log lines, and wrote this description. #1625's admission is mizzied's work and stays in the tree unchanged behind VICTORY_COMPILE_MEMORY=1.

🤖 Generated with Claude Code

…ns it on)

v2026.11.29.01 turned it on (60a08ef, wave 5). In the world the title
commits some 25 GB, so on a 32 GB PC the commit Windows can still promise
sits near 1.5 GB, under the guard's 4 GB floor. Every compile was then put
off, also with none running, so no pipeline was made after the first
seconds of loading: the recording threads waited up to a second for each
refused compile and the frame took 5 to 10 s (0.1-0.2 fps, the loading
screen never left). A system-managed page file grows when commit nears
its limit, so that figure is not where allocations fail; v2026.11.28.03
runs at the same commit at 25 fps.

The admission, its measuring and its log line stay; =1 turns it on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Patrontrox pushed a commit to Patrontrox/victory-nvidia that referenced this pull request Nov 29, 2026
…ns it on) (trustno1-coder#3347)

Ported from the open pull request upstream; not built or run on Windows here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0152f2edzJgEaekDarfT9HKb
@Lyrnc

Lyrnc commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

More A/B runs, adding the two newer guard PRs. Same setup as the table above: RTX 5080 + 9800X3D, Series S, DLSS Quality, FG and RT off, standing still, 300 s per run. "Cold" means the driver pipeline cache was deleted before the run. The columns are fps, compiles put off, and pipelines failed with 0x8007000E.

Build (on 829188e) Cold Warm
829188e 0.1–0.2 fps / 1,337 / 1,272 23.5
this PR (admission off by default) 23.2 / 0 / 0 23.8
#2392 0.2 / 332 / 138 23.0
#2717 0.2 / 477 / 153 23.2
#2743 0.2 / 95 / 0 1.1 / 596 / 0
#2886 0.4 / 172 / 70 25.9, but 636 put off and 276 refused, so draws are dropped
#2886 + #2392 (they merge cleanly) 22.4 / 0 / 0 25.4 / 0 / 0

#2886 and #2392 together leave the cold stall as well as this PR does, and they keep the admission on, so they also keep #1625's protection where the page file can't grow. If the maintainers prefer to keep the guard, merging those two together is the alternative to this PR. Neither one alone is enough on a 32 GB PC. #2886 + #2717 conflict in memguard.rs and compilemem.rs and were not tested.

AI use: Claude Code (Claude Opus 5.5) ran these runs and wrote this comment.

@Lyrnc

Lyrnc commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

A note on the method above: the builds shared one cargo target dir, and that turned out to leave out a branch's victory-shader changes when the checkout's files were older than the last build. Every change that matters here (memguard.rs, compilemem.rs) is in victory-gpu and was compiled into these builds, so the guard numbers stand. #2886's own victory-shader commits were not in its build. They don't affect the compile admission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant