A 6-core CPU is the wall in the world: 0.4-0.8 fps, 684-3,186 ms/frame of texture preparation against 43-265 ms of GPU #612
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/fxceless--victory-fork#612
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@WuDiXiaoBo on GitHub · 2026-11-25 03:14 UTC · original
A 6-core CPU is the wall in the world: 0.4-0.8 fps, 684-3,186 ms/frame of texture preparation against 43-265 ms of GPU
First: thank you for this fork. On my machine it goes from the menus into the opening credits and the world, which upstream does not do here at all. This report is only about where the time goes on a smaller CPU than the one in your README, in case it is useful for the "playable on more than one PC" goal.
Environment
cargo build --release -p victory,2119b0e-era tree (beforec96b4f2); the numbers below are from two runs on that treeWhat happens
Menus are 30 fps as advertised. Leaving the menu into the opening, frames take 1.2-4.2 s. The frame-time breakdown that the host logs makes it fairly clear that the GPU is waiting for the CPU:
So the GPU is busy 43-265 ms of a 1.2-4.2 s frame, and
preparingtakes the rest, dominated bytexturesand bycopies(50-91 ms, 70-213 MB/frame, plus 12-19 MB/frame copied back). At the same time the log shows 900-1,550 draws/frame dropped as "being made" (pipelines still compiling) and about 1,000/frame dropped for "a stage of the ray-tracing structure builder, which is off".Memory was not the problem: 23-24 GB private commit, and the paging file now has room; there was no crash and no device loss in these runs.
What I tried
VICTORY_RELAY=2VICTORY_LATE_WAIT=3VICTORY_WIDE_BACK=1VICTORY_CARD_BUFFERS_MIN_MB=1VICTORY_CARD_BUFFERS_MB=1024: early frames went from 1,107 ms to 502 ms, but the world frames stayed at 2.5-3.5 s. (Possibly because the remaining cost is not submission-related.)VICTORY_TEXTURE_STAGE_MS=120VICTORY_BAKE_TEXTURES_MS=250VICTORY_TEXTURE_CATCHUP=0: not validated - the run with those set did not reach the world, because the scripted key presses land at the wrong time when the start-up time changes with the shader cache. I will repeat it with someone at the keyboard and report back if it helps.Questions
VICTORY_TEXTURE_STAGE_MS/VICTORY_BAKE_TEXTURES_MS? The 250/1,500 ms defaults look tuned for a 20-thread CPU; at 6 cores a smaller default would trade a longer texture backlog for a frame rate that is not 0.5 fps.VICTORY_*switches, is there one aimed at exactly this that I have missed? I read the ones near the texture budgets and the late-wait/relay pair, but not the rest.If you would rather not take reports about slower machines: say so and I will keep this to myself rather than filing follow-ups.
AI-assisted: the runs, the log extraction and this text were produced with DeepSeek Harness (DeepSeek-V4-Flash) on my machine, at my request. Every number is from the runs described; no game data is included.
@Proudnoob4 on GitHub · 2026-11-25 03:33 UTC · original
Numbers from a bigger CPU on the same tree as yours, to help separate "6 cores" from something else. They use the same counters as your table (the host's frame line).
Machine: i5-13600K (14 cores / 20 threads), 32 GB RAM, RTX 4080 16 GB (driver 621.01), Windows 10 22H2, Series X profile, diag build, cold shader cache, 1,500 s runs.
Same code as yours. Zettrox/ztrx
90b529fis fxceless2119b0eplus a README andscripts/play.ps1(GitHub compare: 1 commit ahead, 0 behind, those two files only). I ran it with #175 (Agility SDK on Windows 10):Your rows, if your "uploaded/frame" is the MB of the same
texturesfield, work out to 76-174 MB/s (173 MB in 996 ms; 108 in 684; 364 in 3,186; 242 in 3,166). The same counter on the same code runs at 0.7-2.2 GB/s here, roughly 10x faster per MB.Q1: yes, that work is single-threaded in this code, so the core count by itself should not decide it:
texturestime isStaging::refresh, which detiles a texture's title memory into its staging buffer: texture.rs:664-671. The submission's step loop calls it one texture after another: host.rs:5226-5229. At2119b0ethe same code sits at texture.rs:602-607 and host.rs:5145.VICTORY_WIDE_REFRESH=1spreads only the title-memorycopiesover worker threads (host.rs:5346-5359). It does not touch the textures.A gap of 10x per MB looks like something per byte, not per core. One guess, unmeasured: the detile reads title memory, and pages trimmed to the paging file would make each read a hard fault. For scale: here, 22 minutes in on
c96b4f2, victory.exe had 23.7 GB private but a 4.3 GB working set, with 8.3 GB of RAM free. During one of your 3-second frames, Resource Monitor → Memory → "Hard Faults/sec" for victory.exe would show whether that is it.Q3, one thing to know about the switches you tried: none of them exists at
2119b0e(no match anywhere in that tree).VICTORY_TEXTURE_STAGE_MSandVICTORY_TEXTURE_CATCHUParrived in3bff182e, andVICTORY_BAKE_TEXTURES_MSonly inc96b4f2. So on a tree beforec96b4f2the bake switch does nothing, and on2119b0eitself none of the three does.c96b4f2is clearly faster here. fxcelessc96b4f2b+ #175 on the same machine, cold cache, 1,500 s, gives a steady 3.2 fps / 316 ms. On the same machine,2119b0egives 2.3 fps / 427 ms anda803c87cgives 2.6 fps / 383 ms. Most of the gain is copy-back: 35 ms against 71-74 ms.VICTORY_WIDE_BACKis on by default sincec96b4f2(shadow.rs:971; at2119b0eit was opt-in,shadow.rs:961), which matches your early-frame gain when you set it by hand. Entering the world,c96b4f2spends more on textures up front (186-355 ms at 293-333 MB, from "textures are on the card before the character bake"). That fell under 50 ms within about 15 s and to 7 ms steady.AI-assisted (Claude Code, Claude Opus 5.5); measured on my own machine. No game files attached.
@maplerouteadmin-dev on GitHub · 2026-11-25 03:54 UTC · original
Same wall on another 6-core machine at
310c6eb, andVICTORY_TEXTURE_NO_WAIT=1takes most of it away here.Setup: Ryzen 5 5600X (6 cores / 12 threads), 32 GB, RTX 5070 12 GB (Blackwell, driver 32.0.16.2114), Windows 11; Series X profile; diag build of
310c6eb, warm shader cache,VICTORY_PIPELINE_WAIT_MS=4000,VICTORY_SHADER_LOOP_LIMIT=256, the new defaults otherwise. Same scripted input both runs, 300 s each, world reached about 3 min in.Default (
VICTORY_TEXTURE_NO_WAITunset), last minute in the world: 1.8-6.1 s a frame (0.2-0.5 fps), with lines up to 10.5 and 14.9 s while streaming in. Typical line:0.5 fps, 2087.4 ms/frame (1251.3 preparing: copies 104.3 ms 134.0 MB, textures 946.4 ms 15.4 MB; 370.1 on the GPU; 443.2 copying back 78.3 MB)and of those 946 ms of texture refreshes, 938.9 ms waiting for title memory to hold still, 1.7 ms asking the write watch, 0 ms on the texture's own lock. The card was about 12-16% busy by the host's count. The texture queue at the end: 19,393 slots, 9,948 due, 6,463 waiting for their memory.
With
VICTORY_TEXTURE_NO_WAIT=1, last minute in the world: 0.8-1.1 s a frame (0.9-1.3 fps). Typical line:1.1 fps, 890.2 ms/frame (254.3 preparing: copies 95.0 ms 150.6 MB, textures 7.8 ms 18.6 MB; 474.3 on the GPU; 140.0 copying back)Textures 3-100 ms a frame instead of 0.9-8 s; 12-22 refreshes a frame read through the kernel, 1-1.5 left for the next refresh. The card about 50% busy. No crash, no device removal. I did not see anything wrong in the picture that I could pin on the switch (the faceless low-detail characters and white haze are there either way).
So on this machine the "textures" part of the 6-core wall is the remap lock, not CPU work; what is left is copies + copy-back (~250-400 ms) and the GPU (~350-480 ms). Maybe worth making the switch the default?
Also seen, unrelated: one launch of the same build crashed while loading the world (~frame 1,726) with
0xc0000005 at <image>+0x164a298 (read 0x2c: nothing mapped there). The same address crashed an upstream build here once yesterday, so it looks like an intermittent title-side null read rather than something new in this commit.@0xmp3 on GitHub · 2026-11-25 03:55 UTC · original
A third 6-core datapoint, and one that may reconcile your finding with the
VICTORY_TEXTURE_NO_WAITresult just above — because on my machine that switch makes the frame worse, not better, and I think the difference is whether the GPU or the copy lane is the limiter.Machine: Ryzen 5 5600 (6 cores / 12 threads, same family as the 5600X above), 64 GB, RX 9070 XT (RDNA4, driver 32.0.32015.7029), Windows 11 26300, fork
c96b4f2, diag build,VICTORY_SHADER_OPT=59(required on this driver, see #422),VICTORY_RELAY=2,VICTORY_SHADER_LOOP_LIMIT=256,VICTORY_BVH_BUILDER=1 VICTORY_BVH_QUARANTINE=1,VICTORY_INPLACE=1.Your conclusion holds in the default configuration. Menu frames here read
gpu=0.0 mswith 12–15 draws, and world frames 2,200–5,000 ms with the GPU mostly waiting.But
VICTORY_BVH_BUILDER=1changes the split, because the ray-tracing traversal becomes real GPU work. Warm world frames on this card:So the GPU is ~45% of the frame once the builder runs, not 4–6%. That is also the configuration where the game actually looks right (lit interior, sun through a doorway, shadowed side of the room), which is why I would not read the builder-off numbers as the target state.
VICTORY_TEXTURE_NO_WAIT=1here:The switch does exactly what its name says — the remap wait is zero in every one of 36 frames, where the base run had it in 15 of 114 — but the frame gets ~20% slower and GPU p90 rises 1,206 → 1,635 ms. My reading: when the GPU has real work queued (builder on), overlapping refreshes with it costs cache locality and coherence, so removing the stall spends more than it saves. When the GPU is idle (builder off, or on hardware where the GPU absorbs a 43–265 ms frame), there is nothing to disturb and the switch is pure win.
So both results can be right, and the deciding variable is the builder, not the CPU. Worth stating explicitly in any guidance, because "6-core = the wall" plus "NO_WAIT fixes it" would send people with the builder on in the wrong direction.
On the CPU wall itself, two numbers that may be useful. The copy lane is not short of cores — this process sits at about 0.9 of 12 cores — it is serialised onto the thread that records the frame, which is why the GPU reads 0.0 ms while frames crawl. And the texture queue it feeds is losing ground: over ten minutes, 455 → 49,169 textures uploaded (82/s, 34 MB/s) while the backlog of textures waiting grew 431 → 13,357 (+22/s). Demand runs ~104/s against supply ~82/s, so a scene never finishes texturing — which is what "surfaces resolving slowly" looks like on screen.
I also tried the obvious fix for the supply side, and it backfires:
VICTORY_TEXTURE_STAGE_MS=500(1,500 ms per pass, since catch-up triples 250) crashed both runs inside the title —0xffffffffffffffffreads at+0x4f400a9and+0x108557— with private memory climbing 12.7 → 28 GB and one frame copying 4.3 GB in 5.3 s. Details are on #178. Short version: a longer pass on the same thread grows the staging buffers faster than the backlog drains.No game data; all numbers from VIctory's own frame and copystat lines. AI-assisted (Hermes Agent).
@WuDiXiaoBo on GitHub · 2026-11-25 05:27 UTC · original
Third 6-core machine, and
VICTORY_TEXTURE_NO_WAIT=1is the whole difference here: 4.7 s -> 0.18-0.40 s a frameAnswering @Proudnoob4's MB/s question and running the switch that @maplerouteadmin-dev and @0xmp3 asked about, on the card from the report (RTX 4060 Ti 16 GB, Ada, 32-lane, driver 32.0.16.2114; i5-12400 6C/12T; Windows 11 26300; branch
c96b4f2, BVH builder off, so the builder-on caveat in the comment above does not apply here).The MB/s figures, as asked. My four rows work out to 174, 158, 114 and 76 MB/s (173 MB in 996 ms; 108 in 684; 364 in 3,186; 242 in 3,166). So yes: the same counter runs ~10x slower per byte here than the 0.7-2.2 GB/s you measured, which fits "something per byte" rather than "6 cores".
A/B, same diag build, same save, same scripted input, 200 s each, last 60 s in the world
textures/frameVICTORY_TEXTURE_NO_WAIT=1That is 12-25x on the median, no crash and no device removal in either run, and it matches maplerouteadmin-dev's reading ("the 6-core wall is the remap lock, not CPU work") on a third 6-core machine and a different vendor. On this card the card is idle-ish in the default case (the host's own line reports 43-265 ms of GPU in a multi-second frame), which is the state where 0xmp3 says the switch is a pure win — and it is.
Hard faults. @Proudnoob4's guess looks right in direction, with the caveat that the counter I can read is system-wide. During the baseline run's slow frames the system's
Pages Input/secspiked to 85,745 / 181,570 / 155,803 (0 in the quiet samples), with victory.exe at 23.6 GB private against a 15.8 GB working set; withNO_WAIT=1both the stall and those spikes mostly disappear (0-1,240 in the same period).Process(victory)\PageReads/seccame back empty on this machine, so I could not isolate it per process — a Resource Monitor trace during one 5 s frame would settle it.A correction to my own report. You are right that
VICTORY_TEXTURE_STAGE_MS,VICTORY_TEXTURE_CATCHUPandVICTORY_BAKE_TEXTURES_MSdo not exist at2119b0e: the switch test I described as "not validated" actually ran on ac96b4f2build, while the table's numbers are from the2119b0e-era runs. That is my mistake, and it makes the "not validated" line misleading — on an2119b0etree there was nothing to validate. Sorry for the noise.On
c96b4f2vs2119b0e: I cannot confirm the tree-to-tree gain from my data, because my2119b0eruns and today's baseline differ in how much of the scene had streamed in by the time I sampled (today's baseline is 3,400-7,700 draws a frame). What I can say is that on this machine the difference betweenNO_WAIT=1and not is an order of magnitude larger than any tree difference I have measured.A question for the fork's owner: given the above and 0xmp3's builder-on result, would it make sense for
VICTORY_TEXTURE_NO_WAIT=1to be the default when the BVH builder is off, with the caveat written next toVICTORY_BVH_BUILDER? Right now the person with the weaker card has to find an undocumented switch to get 4 fps instead of 0.2.Numbers only from VIctory's own frame and copystat lines; no game data. AI-assisted (DeepSeek Harness, DeepSeek-V4-Flash) on my machine, at my request.
@WuDiXiaoBo on GitHub · 2026-11-25 07:12 UTC · original
After
a26859f+VICTORY_TEXTURE_NO_WAIT=1: the texture stall is gone, and here is what is left on the same 6-core machineTwo things, both from the machine in the report (i5-12400 6C/12T, RTX 4060 Ti 16 GB, Windows 11 26300, branch
a26859f, BVH builder off):1. The prologue is now playable through on this machine. With
VICTORY_TEXTURE_NO_WAIT=1I played the whole prologue start to finish at about 3 fps (the checkpoint the game made is in the save folder). Two hours ago, before the switch, the same place was 0.2-0.8 fps. It is slow, but it is a playthrough, not a slideshow of one room.2. Where the time goes now. Same diag build, loaded the checkpoint, 11 in-game frame lines at 2,000-6,300 draws/frame:
preparingcopiestexturescopying backtextureswent from 890 ms a frame (844 of it waiting for title memory to hold still) to 32 ms, so the switch does the same thing on the new tree as it did onc96b4f2— that part is settled.What is left is a different shape than before:
copying backis now the second-largest logged item (96 ms, 22 MB a frame), afterpreparing;copiesare 107 MB a frame, which at the 0.7-2.2 GB/s @Proudnoob4 measured should be ~50-150 ms — it is 64, so that part is running at his speed now;And one thing a player notices more than the median: a 7.1 s single frame at 6,299 draws while new geometry streamed in, which is the p90 of the table.
Dropped draws are quiet: 267 a frame for the ray-tracing structure-builder stage (off, expected), plus 3-4 refused compute programs.
Question: with the card this idle and
copying back+copiesnow the biggest named items, is the next thing the copy-back path, or is the unaccounted ~450 ms the title waiting on something we can see with a different counter? Happy to run whatever switch you want measured —VICTORY_LEVELS_ON_DEMAND=1is the obvious one to try here next, since 3.1 GB of card memory are being held for levels the title does not use.Numbers only from VIctory's own frame lines; no game data. AI-assisted (DeepSeek Harness, DeepSeek-V4-Flash) on my machine, at my request.
@mehmetarslanca on GitHub · 2026-11-25 13:13 UTC · original
Another 6C/12T data point, with a different platform and much less RAM: Ryzen 5 5500, RTX 3060 12 GB, 16 GB RAM, CachyOS / Proton / VKD3D-Proton 3.2.
The earlier Linux evaluation (
vongikkingen/victory-gikkingen@c0487ce) with the texture no-wait path reported texture preparation around 94–302 ms/frame, versus several seconds in an older2119b0e-based evaluation. It still did not produce a visible world before that session ended.After integrating the fork's
a253706changes into the Linux tree, plus selected existing community fixes, the world finally rendered. I re-extracted 115 logged world-stage samples (at least 500 draws/frame) from the resulting session:Copies and textures are components of preparation, not additional independent frame costs.
One late sample was 1,324.6 ms/frame with 1,094.3 ms preparation, 220.0 ms copies, 6.7 ms textures, 29.1 ms GPU time and 758.7 ms copy-back; 3,627 draws/frame.
In other words, the texture cost can become relatively small while copies and copy-back remain expensive. In this run the integration report also records zero card-side buffer copies. The session ended in a global OOM kill after ~23 minutes, with ~95.4 GiB of system-wide swap traffic (#109). That makes this a heavily memory-confounded data point, not a controlled comparison with your 32 GB Windows machine. The earlier evaluations also used different revisions, cache states and scenes, so I would not interpret the texture numbers as an isolated speedup benchmark.
The Linux integration provenance is in #6. The result suggests it may be useful to profile copy/backing residency and paging separately from texture worker contention on small machines.
AI-assisted integration, testing and reporting; the 115-sample statistics and last-frame line were rechecked directly against local logs. No assets attached.