RTX 5090 / Linux: ~25 ms of CPU per frame caps play at ~27 fps; 87% of refresh checks copy nothing, and sampled-slot marks cost up to 31 ms of card time in one shader #473
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?
Imported from TaynanGT/Vice-Tay. Originally posted by zmelumian972 on 2026-11-30T19:43:06Z.
Setup. As in the cache issue: CachyOS, RTX 5090 32 GB (driver 620.73.04), Ryzen 7 9800X3D, 62 GB, GE-Proton11-14,
mainadaa77a3release,vice-tay play --res 1440 --dlss off --set VICE_TAY_CODE_TABLE_AFTER=1 --set VICE_TAY_LIBRARY=0, saved game in the world. Pipelines warm (no compiles, 0 pipeline waits).Where a frame goes (steady play, run 13, 5 s reports)
Mean 27.0 fps. Per frame:
preparing per frame, the submitting thread)So the submitting thread is the limit, and its largest single item is establishing that ~9,000 ranges a frame have not changed. Data actually moved is ~45 MB a frame.
The GPU is not saturated either. Nsight Systems GPU metrics (
gb20x, 30 s of play, run 9) while the card had work (GR Active 92%): SMs Active 39%, SM Issue 11%, compute warps in flight 9% of capacity, DRAM read 3%, PCIe RX 6%. Power 220-290 W of 500 W. So the card is fed many small, serialized jobs (4,000-5,000 draws and ~4,600 indirect executions per frame;VICE_TAY_INDIRECT_MERGEreports 0 that could join) rather than heavy shaders.Sampled-slot marks in a heavy compute shader
In one area fps fell to 8-9. The card meter showed
compute 2561af9577c47289at 31-33 ms a frame (one list). Its translation (VICE_TAY_SHADER_SAVE, 24,664-byte container → 331 KB DXIL) has no code table; it has 141sampleLeveland 154atomicBinOp(Or), all intou251(SLOT_SAMPLED): each sample does arawBufferLoad, a test and an atomic Or behindWaveIsFirstLane.VICE_TAY_SAMPLED_MARKS=1is inplay.rsSETTINGS;VICE_TAY_SAMPLED_EVICTwas 0 in these runs.A/B with
VICE_TAY_SAMPLED_MARKS=0(warm, same route): mean fps 27.0 → 26.5 (no change: the CPU limit above dominates), but the worst frame cost of2561af…was 4.7 ms against 32.8 ms with marks on. Those are different moments of play, so this is a strong hint, not a controlled measurement. No texture problems were noticed with marks off on this 32 GB card; the marks feed texture priority since739f8339, which matters more on small cards.Suggestions
slot_evictneeds them.Related: #267 (submitting thread at 65 ms on a 5070 Ti), #36, #88. Logs and the Nsight report are kept locally.
Imported from TaynanGT/Vice-Tay. Originally posted by zmelumian972 on 2026-11-30T21:29:50Z.
Sampled marks (suggestion 2): tried, no measurable gain
Change tested (local branch, not pushed): marks are made once per descriptor load at the end of each IR block instead of after every image instruction. On
compute 2561af9577c47289, translated as on a 32-lane host (the game's 330 KB DXIL), that is 271 marks → 140, DXIL 329,952 → 316,704 bytes. Skipping loads already marked in a dominating block saved nothing more.A/B (RTX 5090, Linux, 1440p, DLSS off,
VICE_TAY_CODE_TABLE_AFTER=1 VICE_TAY_LIBRARY=0,VICE_TAY_CARD_METER_PIPELINES=1on both sides; 180 s per run from a fixed start; runs alternated; each build's cache warmed by an unmeasured run first; closed with WM_CLOSE, all exit 0, no Xid).Intro cinematic from a fresh save (same scene every run):
2561afcard time, mean ms/frameSaved game (prison window scene), 4 alternating runs: 14.6–15.5 fps on both sides, and
2561afnever reached the per-pipeline top 48.So the difference is within noise. Note also that the 25–33 ms spike of
2561afin the first report happened withVICE_TAY_SAMPLED_MARKS=0too (25.8 ms in one of those runs) and could not be reproduced in 9 later runs, so the marks are not shown to cause it. Fps here is low because the per-pipeline meter costs ~10 fps; without it this scene runs at ~27 fps, limited by the submitting thread.Next: suggestion 1 (refreshes that copy nothing). The existing
VICE_TAY_FLUSH_SIFT/VICE_TAY_FRONT_SIFTdo that reordering and are off by default with no recorded measurement; they are being A/B'd now, together withVICE_TAY_NARROW_BARRIERSandVICE_TAY_BARRIER_STATSfor the GPU side.Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T23:43:33Z.
Good to have the sampled-marks A/B in writing, including the part where the 25-33 ms spike showed up with marks off too. That rules them out as the cause better than any guess would. I'm leaving
VICE_TAY_SAMPLED_MARKSas it is.On suggestion 1, you're testing exactly what I'd test.
VICE_TAY_FLUSH_SIFTandVICE_TAY_FRONT_SIFTwere written for those ~9,000 no-op refreshes and have never been measured as defaults. Before either one goes on by default here, it needs the same A/B on the Windows 4K boat route, since the submitting thread is the limit there too. So post your numbers when you have them, including the runs where one of them doesn't help.One thing from #472 that matters for these runs: current
maindrops the pipeline library under Wine on NVIDIA by default now (#485). You don't needVICE_TAY_LIBRARY=0anymore, and it won't change your baseline either way.Imported from TaynanGT/Vice-Tay. Originally posted by zmelumian972 on 2026-12-01T17:41:04Z.
Suggestion 1:
VICE_TAY_FLUSH_SIFT+VICE_TAY_FRONT_SIFT: no measurable gain hereSame setup as the sampled-marks A/B (RTX 5090, Linux, 1440p, DLSS off,
3aad3bf3, warm cache, intro cinematic from a fresh save, 180 s per run, alternating runs, no per-pipeline meter). Both flags off vs both on:The flags take effect (refreshes handed to the thread pool fall from ~1,230 to ~960 a frame), but fps and the submitting thread's time don't move beyond noise. All runs exited cleanly, with no Xid. This is not the Windows 4K boat route, so it doesn't settle a Windows default; on this Linux setup they don't help.