Copy-back of 27.8 MB costs 100 ms of a 210 ms frame (RTX 5070 Ti) #3590
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#3590
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?
@ChenmouXu on GitHub · 2026-11-27 19:34 UTC · original
Copy-back of 27.8 MB costs 100 ms of a 210 ms frame (RTX 5070 Ti, 0x887A-free, picture correct)
Split out from #2626 at andrewpozdnakov7-jpg's suggestion: the copy-back path is separate from the refresh/copy work #2428 touches, so it does not belong in that PR's review.
Machine: RTX 5070 Ti Laptop (Blackwell, driver 32.0.16.1074), Ryzen 9 9955HX, 32 GB, Windows 11 26200. Title 1.0.2.1, Series S profile, DLSS Quality (0.667), 4,611 draws/frame. Stack:
main63bcca4+ #2626 + #2098 + #2178 + thepacked target formatdiagnostic commit.The frame line:
Why it looks wrong: 27.8 MB in 100.0 ms is about 280 MB/s. A PCIe link on this machine is an order of magnitude faster than that, so the time is most likely per-range setup or stalls rather than bandwidth. It is also the largest single line in the frame after preparation, and it sits on the CPU side of the present, so it lands directly in the frame time.
What I can measure if it is useful:
VICTORY_LOG=infoacross two or three frames, to see whether the 100 ms is stable or spiky;--console series-x, where the buffers are larger, to see whether the cost scales with bytes or with ranges.Point me at the switch or line you want and I will run it; I do not have a build with instrumentation beyond the diagnostics profile.
Not claimed: that this is worse than expected for this design -- only that 280 MB/s for a copy-back looks like per-range cost, and that it is now the largest line in a 210 ms frame.
@andrewpozdnakov7-jpg on GitHub · 2026-11-27 19:54 UTC · original
@ChenmouXu, #3594 adds the range measurement. In a build with
diagnosticsandVICTORY_LOG=info, look forcopy-back ranges per frame. It reports the average counts of distinct explicit ranges eligible for copy-back, ranges that actually write bytes, and ranges withheld.The time in the existing frame line starts before the range collection and includes marked-page handling and after-submission work. The MB beside it come from writes through the explicit range path. The separate
marked pagescounters already report their own bytes and time.If you can repeat the same scene with the same settings, two or three reporting windows would help. Please share only the FPS/copy-back timing, the new range line and the
marked pagesfigures fromcopies per frame. The synthetic Windows verification is linked below.Verification
@andrewpozdnakov7-jpg on GitHub · 2026-11-27 20:13 UTC · original
The paired branch is available if you want both measurements in one diagnostics build. It combines #3594 and #3598. In this build the MB in the frame line already include the writes from marked pages. The
marked pagesline gives that component separately.The same report fields from my earlier comment are enough. Please include the commit used with the sample so we can read the byte total correctly. Both reporting paths were verified on Windows WARP.
Paired verification
@ChenmouXu on GitHub · 2026-11-27 20:27 UTC · original
Measured with the fields from #3594 -- and the copy-back is not the problem I reported; the GPU time is
Build:
main63bcca4+ #2626 + #2098 + #2178 + the packed-format diagnostic76f8792+e7fc3fba(#3594 and #3598) applied on top, diagnostics profile,VICTORY_LOG=info, Series S profile, DLSS Quality (0.667), 1,440 picture. Same save as before.Three reporting windows:
So with these fields: 38.9-39.3 ms copying back 37.4 MB, and zero explicit ranges actually wrote bytes -- every eligible range came back written=0, which says the bytes in that MB figure come through the marked-pages path, exactly as you described. Effective ~950 MB/s on the copy-back, not the ~280 MB/s I reported.
My earlier number was not comparable and I should withdraw it. The 100 ms / 27.8 MB sample came from
VICTORY_DLSS_MODE=ultraperformancewithVICTORY_MENU_RES=1080to1440; these are Quality at 1440. Different render resolution, different frame mix. So there is no evidence here that the copy-back is unusually slow, and the 280 MB/s reading was an artefact of comparing two different configurations.What the same windows do show is where the frame actually goes: 543.9 and 612.7 ms on the GPU, against 120-127 ms of preparation. At 3,366-3,718 draws the card is the limit in this profile, not the copy-back and not the submission.
I am sorry for sending you after a number that did not survive the measurement -- the instrumented fields are what settled it. If a GPU-side question is more useful, I can keep the same build and report the frame line with
VICTORY_GPU_TIMING=1on this save.@andrewpozdnakov7-jpg on GitHub · 2026-11-27 20:31 UTC · original
Thanks for the matched windows. In the two full samples, the GPU accounts for 544–613 ms of the 712–775 ms frame and copy-back accounts for about 39 ms. Zero explicit writes identifies the marked-page path as the source of the reported bytes on this branch. The earlier sample used a different render configuration.
A GPU timing sample on the same Quality/1440 settings would help attribute the longer interval. The command timing on
63bcca4can be empty when DRED is off. #3534 enables command timing and I verified that path on Windows WARP. If you take another sample, please share only the aggregate slow command types and durations, plus the frame line. Timing verification@ChenmouXu on GitHub · 2026-11-27 20:36 UTC · original
GPU timing on Quality/1440 (Series X): 486 ms of commands, and no single slow command -- 306 of them, none over 3.7 ms
Build:
main63bcca4+ #2626 + #2098 + #2178 +76f8792(packed-format line) +e7fc3fb(#3594/#3598) + #3534 for the command timing. Diagnostics profile,VICTORY_LOG=info,VICTORY_GPU_TIMING=1, Series X profile, DLSS Quality (0.667), 1,440 picture, same save. 4,121 draws/frame.The
slow list commandlines, grouped (306 in total):The largest single one is 3.7 ms:
So the 486 ms is not a bottleneck command that could be named and fixed: it is ~300 commands averaging ~1.6 ms each, and the count is dominated by compute dispatches rather than draws. If that is the shape on your side too, the lever is fewer commands or a cheaper per-command path, not a single hot command.
One caveat on the frame line from the same window, so it is not read as a regression:
VICTORY_GPU_TIMINGruns the lists separately, which is where the 4,266 dropped draws and the much longer frame come from -- the ordinary frame line is the baseline, as you said. The 486 ms of commands is the part worth comparing.If a breakdown of what the 144 dispatches do is useful (their pipelines or their sizes), say which field you want and I will pull it from the same run.
@andrewpozdnakov7-jpg on GitHub · 2026-11-27 20:46 UTC · original
@ChenmouXu The most useful lines from that same run are the five highest
GPU … ms/frame in … commands/frame: dispatch […]entries under the 485.8 ms/frame summary. Those lines already carry the cumulative time, count and pipeline tag. If the first entry stands out, the dispatch group dimensions for just that pipeline would help distinguish a large workload from a frequently repeated one. The aggregate lines alone are enough if dimensions take extra work to extract.The
slow list commandlines show up to six commands from each separately timed list whose wall time exceeds 50 ms. The 485.8 ms/frame summary includes all timestamped commands on the timed lists, so the aggregate pipeline lines are the better starting point for prioritizing. The timing mode waits for each list separately. I will keep the timing-off window as the frame-rate baseline given the change in dropped draws. Thanks for recording both.