RTX 5070 Ti / i9-9900K, Series X: 14 fps with the submitting thread at 65 ms; eleven switches A/B'd without a gain, three counters, two structural suggestions #267
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/TaynanGT--Vice-Tay#267
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?
@marekpastuszczak-lang on GitHub · 2026-11-27 13:01 UTC · original
Measurements from one more NVIDIA machine, with every existing switch I could find A/B'd against the same scene, and two structural suggestions at the end. The measurements are mine; the suggestions come from reading the code and are marked as such. AI-assisted (Claude Code).
Machine and method
RTX 5070 Ti 16 GB (driver 32.0.16.1656), i9-9900K (8 cores, 16 threads), 32 GB RAM, Windows 11, game on NVMe. Build
6594538,diag, shaders translated ahead, Series X profile, windowed, the settings ofplay.ps1 -Machine 4070. ScriptedVICTORY_KEYSonly. Each run is 7 minutes; the figure is the median of the frame lines from 180 s after the world's first frame to the end, always the same scene (the prison window, about 4,700 draws a frame). Runs before the third are slower (pipelines), so the base was run four times: 13.8 to 14.1 fps.Base
14.1 fps, 70.9 ms a frame, the card about 68% busy, 26 GB private, 11.4 GB VRAM, free RAM down to 0.3 to 0.6 GB.
From the log, per frame:
the card idle behind us21.5 ms; the title's threads waited 24.9 ms at presents; 14.3 submissions in the line when one was added, 13.0 of 28 prepared together with the one before;copies per frame: 22,339 refreshes over 17,866 MB, 9,535 MB checked, 9,463 MB of it unchanged; 249 kernel askings over 1,689 MB (5.1 ms); 11.5 ms waiting for the guards, 5.3 ms changing protections;What was tried, one at a time
VICTORY_ASK_EARLY=1VICTORY_PORT_CONSTANTS=1VICTORY_PORT_DESCRIPTORS=1a view record in the title's heap that no store told of; with ports 2+6+7 together over 4,000 in five minutes and badly wrong pictures in the cutscenesVICTORY_PORT_CBV=1(shaders translated again)VICTORY_PORT_GUARD=1VICTORY_PORT_JOURNAL=1VICTORY_WIDE_SPIN=200VICTORY_LANE_CORE=1VICTORY_JOIN_PARTS=32 VICTORY_JOIN_LISTS=128shadow::wide_threads()from a switch, 8 helpersSo nothing that only adds hands or moves a lock changes the frame here, and the one change that takes real work off the processor (port 1) gives it to the card over the bus.
Three counters added locally (no change of behaviour)
draw.rs,tables): of 40 million groups, 58.6% are fresh because the group holds a constant buffer view, 3.8% only because the table lies past the host heap, 37.6% are not fresh. So about 94% of the fresh tables are the 256-byte alignment of constant views.draw.rs, the recheck): of 52, the last kernel write told of on their pages (watch::writing) was before the upload for 45, never for 5, at or after for 2. Late DirectStorage data is not what changes them; all but six have 9 blocks shown elsewhere.victory warm --usedsays0 pipelines knownafter ordinary runs: it reads the book, and the book is written only withVICTORY_PIPELINE_BOOK=1. After one run with it: 2,470 pipelines made in 238 s (median 422 ms, p99 6.0 s, most 19.7 s). The next run was no different: the first two to three minutes in the world still ran at 1 to 4 fps with about 430 pipelines being made, and the steady state was the same 13.8 fps. Perhaps the same thing as #188.Also:
VICTORY_DLSS_4K=performanceends the process 11 s after start, during NGX's start (log on request).Suggestions from reading the code (not measured)
behind.rsalready rests on the assumption this needs: what submitted lists read is the card's until a fence behind them.send::take: the card's preludes, Execute and Signal on a second thread in order, while the first goes on with the next submission's processor side. This is item 1 of "What is next" indocs/findings.md; the 21.5 ms of card idle behind the thread is what it would win here.joinable/take_along). If it is the whole 174 MB heap declared as written, waves of submissions will stay short whatever else is done.I can send any of the logs, or run a branch on this machine with the same method.
@TaynanGT on GitHub · 2026-11-27 13:09 UTC · original · edited 2026-11-27 13:19 UTC
@marekpastuszczak-lang The 8,654 no-copy refreshes and 64.6 ms on the submitting thread give us a useful baseline. I added the join-reason counter in #271 at
b0ac2d8. Add-More @{VICTORY_JOIN_REASONS='1'}to a diagnostics build atcfcf180; Windows CI passed and the counter is now in main. It distinguishes waits, the join limits, a queue boundary and conflicts with earlier writes or CPU copies. The same prison-window interval will let us compare those counters to the 13 of 28 joined submissions you measured.@marekpastuszczak-lang on GitHub · 2026-11-27 14:10 UTC · original
Run with the counter, same machine, method and scene (the prison window, 180 s after the world's first frame to the end; third run of the build so the pipelines are there). Build
7728185,diag, shaders translated again,play.ps1 -Machine 4070settings withVICTORY_D3D12_DRED=faultsas the launcher now has it, plusVICTORY_JOIN_REASONS=1.Frame rate: 14.1 fps median (p10 13.6, p90 14.5), 70.9 ms, about 4,680 draws: the same as
6594538this morning.Join stops per frame (361 lines, steady over the whole interval; the last three read the same to a tenth):
That is 15 stops for 28 submissions a frame, which fits the 13.0 prepared together with the one before.
Beside it, from the same interval: 13.9 submissions in the line when one was added, the submitting thread worked 66.0 ms, the title's threads waited 25.5 ms at presents; preparing: 6.4 ms asking the write watch, 9.2 title bytes under flights' writes, refreshes 15.8 ms in 40 flushes of 9,338 (7,992 known to copy nothing), 15.8 copies in the card's memory.
What I read from it, for what it is worth: CPU copies never stop a join here and the part limit is never reached, so neither the title's own copies nor
VICTORY_JOIN_PARTSis what keeps the groups short (which is why raising it to 32 changed nothing this morning). A third of the stops are value waits, which no amount of joining gets past, and four a frame are an empty line: the thread catches up with the title four times a frame even though it is the slow side on average. The list limit accounts for two;VICTORY_JOIN_LISTS=128did not move the joined count either, so those two probably turn into another reason when the limit goes.I can run it again with other settings or on a branch, same interval.
@TaynanGT on GitHub · 2026-11-27 14:25 UTC · original
@marekpastuszczak-lang The counter accounts for all 15 stops, and the five value waits plus four empty-queue stops are the biggest buckets. Please rerun the same prison window on
mainwith #286 first. Keep the warmed cache and compare send preparation, queued work and frame time. That gives us a fresh baseline for #284.@marekpastuszczak-lang on GitHub · 2026-11-27 18:38 UTC · original
Rerun done, with a caveat up front: I only got a warm run for
d076657(with #284). Thef386fc9baseline (with #286, without #284) never reached an empty pipeline queue in four 7-minute runs, so I am not giving a before/after for #284.Same machine, scene and method as before (RTX 5070 Ti, i9-9900K, prison window, medians of the log lines from 180 s after the world's first frame to the end,
diag, the same switches as7728185this morning,VICTORY_JOIN_REASONS=1).7728185(this morning, warm)d076657(warm, one run)So #284 does what it says (recycling is off the submitting thread, 9 ms a frame on the helper), but on this machine the frame on
d076657is not shorter than on7728185; the 0.5 fps difference is just above my run-to-run noise (about 0.3), from one run, and 40-odd commits apart, so I would not pin it on any one change. The join stops are unchanged (5.0 value wait, 4.0 empty queue, 3.0 earlier write, 2.0 list limit, 1.0 other job).Something that may matter more: the pipeline queue after this update. Going from
7728185tof386fc9(shaders translated ahead again withvictory shaders):f386fc9f386fc9f386fc9d076657d076657f386fc9againd076657While the queue is there the world runs at 3.5 fps with the picture badly broken (in the first run 850 to 1,000 draws a frame dropped). In run 1 the queue fell from about 585 by roughly one pipeline every 6 s for minutes, with
VICTORY_PIPELINE_WORKERS=3. For comparison, the update from6594538to7728185earlier today drained in the first run. Run 6 suggests that going back to the other executable makes a good part of them again. I can sendslow-pipelines.txtand the logs.AI-assisted (Claude Code).
@TaynanGT on GitHub · 2026-11-27 18:42 UTC · original
@marekpastuszczak-lang The warm
d076657run confirms the reset work moved: 0.0 ms on the submit thread and 9.0 ms on the helper. Thef386fc9runs are evidence of slow pipeline preparation. If you have a summary, the pending counts and the slowest compilation times are enough to compare when an executable is reused and when it changes.