performance: 8 GB RTX 5060 is submit-thread bound; profiles of where the frame goes (measurements only) #4505
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA#4505
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?
@eipastel on GitHub · 2026-11-30 21:31 UTC · original
Summary
On an 8 GB RTX 5060 with a 6-core CPU, the frame rate is held by the submitting thread, not by the card. Below are profiles (WPR/xperf with
victory.pdbsymbols) and A/B runs from 30/11, in case they help whoever works on the submit path. No fix is proposed; this is measurements only.Setup
mainatc71899d9(30/11), release build,play-foxhound.ps1 -SeriesS -Dlss performance -NoMenu, no frame generation, no fps cap.VICTORY_TEXTURE_BUDGET_MB=2000on every run. Without it, card use sits 1.6–2.4 GB over the DXGI budget and everything gets slow and uneven (more in #4463).VICTORY_BENCH_CSVfor frame times.1. The card is not the limit
Card meter (
VICTORY_CARD_METER_PIPELINES=1): the title's lists take about 30 ms of card time per 58 ms frame; the card sits idle 4–22 ms per frame, almost all of it while the submit thread is still working.2. Where the submitting thread spends the frame
WPR, 46 whole frames, taken 120 s after entering the world (after the driver compile below has stopped), frame = present to present, 64.2 ms with WPR on. Sum of slices matches the frame time in every frame.
land::Pool::each2.7,kernel_written2.0,Host::submit1.9 + 2.0 kernel,wide_each_scoped1.6,card_recordinnvwgf2umx1.9,victory_safe_copy_at1.2, ...)Lane::serve)send_late4.6,settle1.9, woken byvictory-relay)shadow::workers(copy refresh helpers)try_upload_buffer_own/resident/sweepThe play-log line agrees: of ~64 ms, ~45 ms "preparing", 20–27 ms of it "copies" (~75 MB per frame).
3. The NVIDIA driver recompiles for ~90 s on every start
The four
D3D Background Threadthreads use 50–218 ms of CPU per world frame for the first ~90 s after entering the world, then drop to 0. It happens on every run, including back to back runs:%LOCALAPPDATA%\NVIDIA\DXCache(22 GB here) gains no files and no bytes. While it runs, the submit thread loses ~11 ms/frame waiting for a core and ~6 ms/frame inside the driver incard_record; both drop to ~4 and ~0.1 ms once it stops. Running non-elevated (runas /trustlevel:0x20000) did not change it. Unverified guesses: the driver cache is full, or pipelines loaded from the pipeline book are recompiled in the background each time.Practical note for anyone benchmarking: a window that starts before ~100 s in the world measures the driver compile, not the runtime.
4. The title's heaviest thread is a spin on the main queue fence
The title thread with the most CPU (~30 ms/frame) spends ~27 ms of it in
SleepEx(0)inside the title's frames-in-flight limiter:+0x4fb0c27(in the function at+0x4fb0ad0, called from the end of frame at+0x2474740). It reads the main queue fence value throughID3D12Fenceslot0x60and waits for frame N-1 to land. On console that loop ismonitorx/mwaitx; on PCconsole_insn.rsturns them into a no-op andpause, so the wait becomes a busy spin withSleep(0).Measured with a hook on that loop: 479 ms of waiting per second of play (21.8 ms per frame). From the title asking for the signal to
fence::setin the landing: median 22.5 ms, p95 39.7 ms.Making the fence land at once (unsafe experiment) gave +1.5 % fps, inside noise, so the wait itself is not the limit: the title just reaches the next point where it waits on the runtime. The spin does use a core, though, on a CPU that is short of cores (item 2).
5. Things that did not move the frame rate (each tried in alternating A/B, gain under noise)
watch::guard(the shortcut is never taken: every lookup that reachesGUARDShas a written block).MakeResidentandsweep: +5 %. Not waiting for the landing: +5 %. Submit thread at time-critical priority: +8.5 %. Noise between base segments of the same run: 15.6 %.GetWriteWatch: about 9x slower. Asking is much cheaper than copying what did not change.Logs, the WPR-derived tables and the analysis scripts are available if useful.
@github-actions[bot] on GitHub · 2026-11-30 21:31 UTC · original
Please attach both logs from the run that went wrong. Without them we can only guess. Paste
%LOCALAPPDATA%into the address bar of File Explorer to get there.%LOCALAPPDATA%\victory\logs\: the newestvictory-nvidia-play-<date>-<time>-<number>.log(fromvictory.exe) orvictory-nvidia-<date>-<time>.log(from the script launcher). The window shows its path at the start, on the lineLog: ....%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newestvictory-<date>-<time>-<number>.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\.Also say which GPU, Windows version (10 or 11)
@eipastel on GitHub · 2026-11-30 23:11 UTC · original
Play log of the profiled run behind sections 2 and 3 (the driver compile stops about 92 s after the world; WPR ran from 120 to 135 s): https://gist.github.com/eipastel/b7ad36336e15f06607e95ba336820074 (raw: https://gist.githubusercontent.com/eipastel/b7ad36336e15f06607e95ba336820074/raw/275d38c87d8a0ac2b9be7bb9526d1d3538924d65/victory-nvidia-20261130-145543.log). Posted as a gist because the file is 7.9 MB. This one is not a crash, so there is no crash log.