Ryzen 5 3600 / 16 GB / RTX 2070 SUPER: CPU saturated, submit thread blocked 31–42% of wall time, 6.8 GB write-combined upload memory #1338
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#1338
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?
@Alexzond on GitHub · 2026-11-28 17:39 UTC · original
I profiled one play session with ETW (xperf). The main results:
victory-submitis on the critical path, but it spends 31–42% of wall time blocked inWrAlertByThreadIdwaits (WaitOnAddress-based locks/condvars). Preemption accounts for about 2%, paging for about 0.3%.shadow::wide,host::read,copy_mapped) are its largest.Details and numbers follow.
Setup
v2026.11.28.03(f4608f0), built from source (cargo build --release --locked -p victory), plus #953 appliedplay <game> --series-s --res 1440 --dlss performance --fps 1000(fromVICTORY_MENU_ARGS); frame generation off, MFG Unlocker offvictory preloadwas run first, but the pipeline library was empty (cache folder had been cleared), so this was the first run building host pipelinesThe patch from #953 never fired in this run: 0 retries, 0
no upload buffer, 00x8007000E. It does not affect the numbers below.Method
xperf -on PROC_THREAD+LOADER+PROFILE+CSWITCH -stackwalk Profileran for 60 s, starting about 9 minutes into the session while standing in the open world. Sampling was at 1 kHz with stacks; CSwitch was recorded without stacks.host pipelines all madeat 15:58:07. Before that line, frames took 460–510 ms while pipelines were built.target/release/victory.pdb).GetThreadDescription.victory-submit's CSwitch events in two 5 s slices.VirtualQueryExwalk of the process at the end of the window.1. Frame and log statistics (analysis window)
frame_times)queue::behindheap_marksdescriptor(heap records)list::thinindirect::merge2. CPU by thread group (analysis window, logical CPUs out of 12)
victory-list-*D3D Background Thread *(driver compiler)victory-pipelines-*victory-submitvictory-wide-*dstorageSamples by module for the whole process:
Pipeline building (
victory-pipelinesplus the driver's background threads, about 1.8 CPUs) was still running afterhost pipelines all made. This is first-run behaviour. On a 6-core CPU those 14 threads compete with the submit path. Fewer or lower-priority pipeline threads during play would probably help CPUs of this size.3.
victory-submit: where its wall time goesOn CPU 62.8% of the window. Off-CPU, from two 5 s slices of CSwitch:
That is roughly 85 waits per frame, averaging about 0.4 ms each. This is not CPU starvation and not paging: the thread mostly waits on other threads of the layer. The log's
heap_markswaits (3.5–10.6 ms per frame) explain part of it. I did not record CSwitch stacks, so the other wait sites are not identified. I can do a second capture with-stackwalk CSwitchif that helps.On-CPU, inclusive, as a percentage of the thread's samples (23.4k):
shadow::wide(→wide_each21.6%)host::readShadow::update/update_freehost::copy_mappedwatch::ask_oncentdll!NtGetWriteWatchxmem::soft_readwatch::ask_ahead/ask_run/writestexture::Staging::refreshShadow::copyvictory_safe_copy_atShadow::nothing_new/watch::nothing_newID3D12CommandQueue::ExecuteCommandListsID3D12GraphicsCommandList::ResetRawVecInner::finish_growVec::retaininstale_of/refresh_frontTop exclusive functions:
vcruntime140!MoveSmall4victory_safe_copy_atHost::submitwatch::nothing_newNtGetWriteWatch(kernel)btree find_leaf_edges_spanning_rangetexture::digestBatch::copy_spansresource::let_go_idlememcpyRtlFreeHeapHow I read this:
MoveSmall411.5,victory_safe_copy_at7.0,copy_spans1.6,memcpy1.4.MoveSmall4(by its name, vcruntime's small-size move path) is the top exclusive symbol, well ahead ofmemcpy. So the copy time comes from many small spans. Joining adjacent spans before the guarded copy would probably help.ask_*,NtGetWriteWatchandnothing_newoverlap as subtrees; together they come to roughly 15–20% inclusive.finish_growat 4.8% suggests per-frame vectors that could keep their capacity.4.
victory-list-*: list translationThese threads use 2.07 CPUs in total. By module: victory.exe 56.1%, nvwgf2um 20.8%, D3D12Core 5.9%, D3D12.dll 5.3%, ntdll 4.8%.
Inclusive, as a percentage of the six busiest list threads' samples:
draw::State::binddraw::State::execute_indirectdraw::State::prepare_forHostHeap::make_listeddraw::State::dispatchdraw::readabledescriptor::host::make_twinnedHostHeap::keepdraw::State::dispatch_meshdescriptor::host::buffer_srvshadow::lookupID3D12Device::CreateShaderResourceViewlist::resethost::retire_resourceID3D12Fence::SetEventOnCompletionID3D12GraphicsCommandList::CloseOne specific hot spot:
D3D12.dll!CUseCountedObject::AddReftakes 5.0% of these threads' samples. All of its callers are undervictory_gpu::list::reset(withHostList::resetinlined), and 99.9% of its time is exclusive. That looks like a refcount contended across the eight list threads, or many AddRefs per reset. Either way, it costs about 7 ms of CPU per frame (3,083 samples over ~420 frames, six threads sampled).More broadly, descriptor-table building per bind (
make_listed,make_twinned,CreateShaderResourceView) dominates. Reusing host tables and views across frames when their contents match looks like the largest lever here.5. Title audio thread
The busiest title thread (55.7% of one CPU) is the audio one. 52% of its samples are title code and 29% are victory.exe:
apu::XApuEnqueueCommand→apu::process: 23.2% inclusive.dsp::XDspSubmitCommand→convolve::Convolver::process: 12.0% (Fft::run4.4%).APU/DSP HLE runs synchronously on the calling title thread.
6. Memory at the end of the window
Committed regions (
VirtualQueryEx, 208k regions; mapped views can alias one section):Notes on the allocations:
The 6.8 GB of write-combined private memory is presumably upload-heap memory, and it sits close to the 7.5 GB non-local budget. That fits the upload-buffer refusals reported on 16 GB PCs (#944). Capping it in proportion to that budget or to RAM, or reusing the 64 MB blocks more, would probably matter most on 16 GB machines.
Earlier crashes on this PC (same day, for context)
0xc0000005write 0x0 atvictory-image+0x23cf683no shared/upload buffer0x8007000E warnings0xc0000005read 0x36 atnvwgf2umx.dll+0x422e03DXGI_ERROR_DEVICE_RESET(0x887A0007) during Lucia's escape (rooftops)Possible next steps (in order of expected effect here)
victory-submitwaits on (31–42% of wall time). I can send a capture with CSwitch stacks.GetWriteWatchcalls.AddRefunderlist::reset.Attached: the play log of the profiled run (
profiled-run.log; user and folder names replaced). The trace (456 MB) contains process names and paths from the whole PC, so I won't attach it publicly. I can share the full per-function tables, or re-run captures with other flags.Captured on my PC; the analysis was written with Claude Code.
profiled-run.log
@CoolDEDXD on GitHub · 2026-11-28 17:41 UTC · original
Bro, can you send the save file after the prison?
[Test Report] Ryzen 5 3600 / 16 GB / RTX 2070 SUPER: CPU saturated, submit thread blocked 31–42% of wall time, 6.8 GB write-combined upload memoryto Ryzen 5 3600 / 16 GB / RTX 2070 SUPER: CPU saturated, submit thread blocked 31–42% of wall time, 6.8 GB write-combined upload memory@trustno1-coder on GitHub · 2026-11-30 15:44 UTC · original
Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is v2026.11.30.01.
If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run:
victory-nvidia-play-<date>-<time>-<number>.login%LOCALAPPDATA%\victory\logs\.%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, plus the newest.crash.login%LOCALAPPDATA%\VIctory\data\7952987A\temp\if there is one from that run.