CPU usage optimization #274
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/trustno1-coder--VIctory-NVIDIA#274
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?
@flokybbad-cmd on GitHub · 2026-11-27 20:34 UTC · original
System Specs
v2026.11.27.3(Series Sprofile,DLSS Balanced,FSR 3 2X, shaders preloaded)Problem Description
In outdoor / dense scenes, the game hits a massive CPU translation and synchronization bottleneck, dropping to ~3–4 base FPS (~6–7 FPS with FG) while the RTX 3070 sits nearly idle.
Profiling Data from Logs & F3 Overlay
From
victory-nvidia-playlogs in outdoor scenes:the card's clock per frame: nothing of ours queued 242.9 ms (the card about 14% busy by this count)VICTORY_THIN):40521 calls in 747.4 ms (all threads), 202.2 lists, 328.0 piecesVICTORY_ASYNC_SUBMIT):that thread worked 60.6 ms... threads of the title waited 240.5 ms at presentsVICTORY_LAND):was 29.1 ms landing in allindirect executions per frame: 4219(unmerged)Ready Community PRs Targeting These Exact Bottlenecks
There are already several open PRs in this repo that directly address these CPU/memory bottlenecks on mid-range multi-core CPUs:
shadow: use the existing AVX2 compare for the refresh and copy-back runs) — speeds up memory comparison inlandingusing AVX2.perf(gpu): shard RETIRED resource queue 16-way and add VICTORY_WIDE_THREADS) — reduces lock contention across CPU worker threads.perf(gpu): reservation-aware write-watch batching, lock-free view/non-watched bitsets) — reduces write-watch overhead during submission prep.Release profile: the program optimised as one unit (fat LTO, one codegen unit)) — enables fat LTO for better single-thread and cross-crate CPU throughput.A lighter profile for 8 GB cards and 16 GB of RAM) — helps keep VRAM/RAM pressure low on 8 GB GPUs.Merging these CPU/memory optimizations into the next official release would make a huge difference for 6-core/8-core CPUs where the GPU is currently starved for work. Thanks for the awesome progress on this project!
@trustno1-coder on GitHub · 2026-11-27 20:59 UTC · original
Thanks for the report. v2026.11.27.6 is out (https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.27.6). Since this was posted, releases from v2026.11.27.4 on include:
If you have time, please try .6 and post new numbers or a new log here. It helps to see what changed on your PC.
@trustno1-coder on GitHub · 2026-11-27 21:09 UTC · original
Thanks for the detailed report. It's noted, and it stays here for others to find. Closing it, since it's a measurement rather than a single bug to fix. Since it was posted, v2026.11.27.4 and later (https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.27.6) fixed memory that kept growing and very long frames when memory filled up. If you find a specific bug or crash, please open an issue for it with the log.
@flokybbad-cmd on GitHub · 2026-11-27 21:23 UTC · original
Thanks for the quick fixes in
.6! Here is a detailed breakdown of the v2026.11.27.6 profiling data and logs from the exact same scene on my setup (AMD Ryzen 5 3600 + RTX 3070 8 GB, Windows 11 24H2,Series Sprofile,DLSS Balanced,FSR 3 2X,MFG Unlocker: OFF):1. Performance & Frame Pacing Breakdown (
.3vs.6)~3.3 FPS(300.8 ms/frame,6.6 FPSwith FG) up to9.1 FPS(110.1 ms/frame,LONGEST 145 ms,18.2 FPSwith FG).VICTORY_RELAY/VICTORY_LAND): Dropped dramatically from32.7 msdown to8.1 ms, eliminating the massive late-session slowdowns.5.6 / 6.8 GBVRAM and19.7 GBRAM (no longer ballooning over time).2. Remaining CPU & Submission Bottlenecks (F3 & Log Data)
Despite the big improvement, the game is still heavily CPU-bound on a 6-core Ryzen 5 3600 while the RTX 3070 sits nearly half idle:
SUBMIT BUSY: 78.0 msvsGPU BUSY: 38.2 ms(IDLE BEHIND US: 45.8 ms,WAITS FOR GPU: 22.8 ms).DRAWS 4273/DROPPED 3529per frame.VICTORY_THIN/VICTORY_ASYNC_SUBMIT/VICTORY_HEAP_SYNC):VICTORY_THIN) and descriptor mirroring (VICTORY_HEAP_SYNC) across 6 cores still bottleneck the submitting thread (~56–78 msper frame), starving the GPU between submits.VICTORY_INDIRECT_MERGE=0by default) generate thousands of separate indirect dispatches per frame on the CPU.3. Remaining Visual Bugs: Black Faces/Clothing & Missing Body Parts
While the bright "confetti" blocks from
.3are gone, black texture patches on character faces/clothing and disappearing eyes/teeth/body parts are still very frequent in both cutscenes and gameplay:VICTORY_TEXTURE_ROOM_PERCENTfrom70to82(~6 GB texture budget) did not fix these black character textures, even though total VRAM usage stays around5.6 / 6.8 GB.Series S/ 8 GB limits or untranslated console texture formats / character SSS shaders (e.g.Marvisak/VIctory/ fork PR #228map console texture formats 189-191).4. Fresh Upstream & Fork PRs Targeting This Exact CPU Bottleneck (
SUBMIT BUSY/ Lock Contention)If you're looking for high-impact CPU optimizations for the next builds (
.7+), these fresh PRs directly target the78 mssubmission and memory-sync overhead seen in my logs:Marvisak/VIctory#3487(Batch submission heap/memory steps and fast-scan bindless and page-table bitmaps): CutsSUBMIT BUSYtime by batching heap/memory steps and accelerating bitmap scans on the CPU.Marvisak/VIctory#3516(Make pages read-only outside the guard lock —VICTORY_GUARD_OUTSIDE): Moves page protection updates out of the global guard lock, reducing worker thread stalls on 6-core CPUs.
Marvisak/VIctory#3484(Fast-skip clean/idle bindless textures and lazy-reset upload list): Avoids redundant per-frame CPU checks on unchanged bindless textures.#142(Shard RETIRED resource queue 16-way and addVICTORY_WIDE_THREADS): Removes lock contention during retired resource cleanup across worker threads.#209(Reservation-aware write-watch batching, lock-free view/non-watched bitsets): Eliminates write-watch locking overhead during submission prep.#151(Use existing AVX2 compare for refresh and copy-back runs): Accelerateslanding/copy-backmemory comparisons using AVX2 instructions.#132(Release profile: fat LTO, one codegen unit): Enables full cross-crate link-time optimization for free single-thread CPU throughput gains.Attaching the full
victory-nvidia-playlog from.6and the F3 screenshot showing the black face/clothing textures below:victory-settings.txt
victory-nvidia-play-20261127-211211-20336.log
@flokybbad-cmd on GitHub · 2026-11-27 21:25 UTC · original
@justrealyme on GitHub · 2026-11-27 22:09 UTC · original
Measurements from a different kind of CPU: Core Ultra 7 265K (Intel hybrid, 8 P + 12 E cores), RTX 5070 Ti (driver 621.40), 31 GB RAM. Release build,
play-nvidia.ps1defaults (Series X, 1440p, DLSS Quality). In the prison cell with caches warm it runs at about 23-29 fps, with the card 70-79% busy. Earlier reports of ~14 fps there were from runs that were still building pipelines.1. On Intel hybrid CPUs the title pins its workers partly onto E-cores. The title calls
SetThreadGroupAffinityitself, with console-style masks. Its ~9 busiest threads ask for 0-7, but on a 265K that's 4 P-cores and 4 E-cores (the P-cores are 0, 1, 6-9, 18, 19). A "time critical" thread asks for 13 alone, which is an E-core. #419 maps the title's processor numbers onto the fastest cores first. Card time spent waiting on the title went from 3.7 to 0.1 ms per frame, and the lowest second went from 6 to 23 fps. The mean was unchanged on this CPU, because the next limit is the submitting thread. Nothing changes on CPUs without E-cores.2. Things tried on the submitting thread that did not raise fps (to save others the time):
VICTORY_ABrun, though, frame times were the same either way, so it isn't proposed.VICTORY_FAST_CORES=3: no difference.3. On noise: the same route into the cell varies by about ±3 fps between runs, so compare small changes with
VICTORY_ABin the diagnostics build, not run against run.Done with AI assistance (Claude Code).