perf(gpu): lift slow-pipeline cap on warm library loads and boost waited-for workers #283
No reviewers
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!283
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-283"
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?
@Mikey970 on GitHub · 2026-11-27 20:40 UTC · original
Mikey970:pr/pipeline-warm-boost→main· +204 −17 · 2 files · 2 commits · merged 2026-11-29 08:16 UTCProblem
slow-pipelines.txtonly grows over time: pipelines that once took >= 1 s to compile on a cold start stay on the slow list permanently. On subsequent warm launches where the D3D12 pipeline library loads those PSOs in milliseconds,slow_limit()still throttles them toworkers / 4atTHREAD_PRIORITY_LOWEST. Hundreds of early cached pipelines spill into world entry, where recording threads stall up toVICTORY_PIPELINE_WAIT_MS(500 ms) waiting on starved lowest-priority workers.Fix
VICTORY_PIPELINE_SLOW): Tracks whether the pipeline library opened from an existing saved blob (library::warm()). While a warm library is actively serving the run (at most 1 in 4 pipelines built fresh), the slow-list concurrency cap is lifted so cached PSOs load ahead of world entry. Cold starts, driver updates, and large translator invalidations keep the cold cap.VICTORY_PIPELINE_SLOW=1forces the cold cap;=0disables it as before.VICTORY_PIPELINE_BOOST, on by default;=0disables): While a draw/dispatch is actively blocked waiting for a pipeline, temporarily raises the worker thread making it toTHREAD_PRIORITY_NORMALand restores its base priority when the wait ends or at the next pipeline.Testing
the_slow_limit_is_lifted_with_a_warm_libraryanda_waiting_draw_raises_the_worker_making_its_pipeline; all 9 tests inpipeline::make::testspass.pipeline_wait_ms = 0) on warm launches.@hazben on GitHub · 2026-11-28 09:56 UTC · original
A data point for #283 from the other side of world entry: pipeline makes in the middle of play, felt as "lag after a pause". RTX 4070 SUPER, 32 GB, DLSS Quality, frame generation off, main
64d4931plus a local patch stack and a diagnostics build, async submit (depth 24). One play run of 3,939 s; a tester reported extreme input lag after the pause that ended at 3,292 s. I read the run to see whether any delay sits between the stick and the picture.1. The stick-to-view delay is normal. Camera angle read every ~0.28 s against the right stick's onsets (windowed cross-correlation); onsets where the view moved before the stick (follow camera) are left out:
By frame time at the onset (all 124): under 45 ms 148 ms (n=29), 45-65 ms 119 (57), 65-90 ms 161 (36), over 90 ms 251 (2). Limits: this reads the game's camera state, not the display after Present; the left stick is no probe (the follow camera answers 1-2.3 s late by itself). The swap chain has 2 buffers, flip-discard; the frame recorder's "begun minus presented" is 0 in all 190,358 frames to 3,333 s.
2. What the 11 lag presses have in common (a key press at each moment the tester felt it; window = press -3 s to +3 s):
3. The cache was warm at the start but not for these places. The line "shaders from the cache and translated so far": hits=3,461 misses=0 at 66 s; misses 12 at 369 s, 42 at 1,437 s, 170 at 2,628 s (hits stay at 3,477 from 1,437 s on). Every shader gets a "shader translated" line, from the cache or not: 3,647 lines to 2,628 s = 3,477 hits + 170 misses. After the pause (3,292-3,800 s) there are 47 more lines; 33 of them fall in the press windows, which are 19 % of that time. Likely mostly misses (hits had stopped growing); unverified, no count line after 2,628 s. So the hitch is the new shaders and pipelines of a new place, not a cold start.
4. No growth with uptime. The raw cost at 8-11.5k draws rose from 68 to 87 ms per frame over the hour. At the same place (within 30 m, draws within 25 %, 106 late/early pairs) the ratio is 1.02 (IQR 0.97-1.11); host copies stay at about 3,660 copies / 2,060 MB. The rise is the scene, not a leak.
Not measured: display latency after Present, the tester's display path, mouse input (13 events in the run, none after the pause).