[RTX 3070 / Ryzen 5 7600X] Frame time bound by the submitting thread (~56 ms at 5–10k draws); port of cool_fox's pipeline-library "store later" reduced stalls #1427
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 trustno1-coder/VIctory-NVIDIA. Originally posted by yoshidacaio on 2026-11-28T19:44:39Z.
<html>
System
9ce3cf9), release, plus the local changes listed at the end Profile | Series S, 720p → 1080p with DLSS Quality, FSR 3 frame generation 2x (FG off where noted) Non-default switches | VICTORY_TEXTURE_ROOM_PERCENT=85, VICTORY_CARD_ROOM_FOR_TARGETS_MB=1600, VICTORY_CARD_ROOM_FOR_TARGETS_SETTLE_MS=8000, VICTORY_POOL_SMALL=1, VICTORY_WATER_LIGHT=0, VICTORY_LIBRARY_STORE_LATER=1, VICTORY_LIBRARY_SAVE_S=60The GPU is never the limit. The frame time follows the draw count through the submitting thread. Here is one representative line from the city at ~10k draws:
The refreshes take ~23 ms even though 86% of the flushes are already known to copy nothing. My guess, unverified: the cost on this 6-core CPU is in waking and joining the helper threads per flush, not in copying.
VICTORY_WIDE_THREADS=8instead of the default 4 changed little in a short run; I can do a longer A/B if useful.The following made no relevant difference here:
VICTORY_WC_BAR=1with Resizable BAR on: no relevant gain, and the picture broke (as its doc comment warns).2. Pipeline-library saves stalled frames — port of cool_fox's
LIBRARY_STORE_LATERBefore, on v2026.11.28.02 with the defaults, I ran a 36-minute session:
While a save holds
savingfor writing, a worker that has just made a pipeline waits to store it, and the frame that asked for it waits up toVICTORY_PIPELINE_WAIT_MS(500).I ported DoubleGhosty/cool_fox's
VICTORY_LIBRARY_STORE_LATERandVICTORY_LIBRARY_SAVE_Stopipeline/library.rs. The patch is attached: one file, off by default, unit tests included (store_or_defer/drain/save_seconds), builds clean on Windows. With it on andSAVE_S=60, the next session had 14 such windows in 21 minutes and 7 saves.Caveat: I also ran a full
victory warmin between, so the two effects are not separated. If this direction is welcome, I can do a clean A/B (same build, same spot,STORE_LATER0/1) before a PR.3. Other findings on a 32-lane card (for reference)
6b82bc7d22016cb5(every session) anda10179ab7eda0dc3(first seen in one session), bothno wave32 lowering for this wave64 program.VICTORY_CARD_ROOM_FOR_TARGETS_MB(3072 by default) is never released at 720p, where the targets use ~1.3–1.5 GB (same as #609). 1600 MB with an 8 s settle released it and kept textures in budget at 85%.VICTORY_POOL_SMALL=1on NVIDIA: 36 minutes, no device loss. 18,746 small textures held in 218 MB, against ~1.2 GB at 64 KiB granularity.VICTORY_LEVELS_ON_DEMAND=1made things worse here: 8.1 GB in use, about half the objects missing.VICTORY_AMBIENT=1.8,VICTORY_AMBIENT_SHADE=0.15,0.6andVICTORY_AMBIENT_ONCE=1, plus a small local change,VICTORY_AMBIENT_FLOOR=<share>. It floors the diffuse estimate at a share of the scene's mean (ambient.rs,max(now, mean * floor_share * open)). I can open a separate PR for it if it is of interest.Local changes in this build
The full patch is available on request. It contains:
Logs available on request.
</html>0001-pipeline-library-store-later.patch
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by benjibutten on 2026-11-28T20:31:58Z.
Same pattern on a different CPU, which suggests it is not about core count.
System: Ryzen 7 5800X3D (8C/16T), 32 GB DDR4-3200, RTX 5080 16 GB, Windows 11 26300.
Release build v2026.11.28.03, Series X 1440p, DLSS Quality, frame generation off, launcher defaults otherwise.
Averages of the "preparing per frame, the submitting thread" lines from one ~10 min session (the intro, including a short stretch of city driving):
Frame rate follows draws: ~2–4k draws gives 20–30 fps, 10–12.8k draws gives 5–10 fps. GPU time is ~0 ms throughout.
The 86 % "known to copy nothing" share is the same as on the 7600X above, with 16 logical processors (6 wide threads by default) instead of 12. I can A/B
VICTORY_WAIT_SPINandVICTORY_WIDE_THREADSon the same save and route if that helps separate thread wake-ups from per-item cost.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by benjibutten on 2026-11-28T21:21:24Z.
Follow-up with the A/B I offered. Same PC and release (v2026.11.28.03), Series X 1440p, DLSS Quality, frame generation off, same save and route (the intro including the city drive), ~5 min each.
VICTORY_WAIT_SPINis not in v2026.11.28.03 (added after the release), so run B ended up as a second baseline and I usedVICTORY_WIDE_SPINinstead, which in this release keeps both the helpers and the waiting thread awake.Metric:
refreshesms divided by refresh items ("flushes of N") from the "preparing per frame, the submitting thread" lines; it holds steady across slightly different routes (A vs B: 2.5 vs 2.4 µs).VICTORY_WIDE_THREADS=2VICTORY_WIDE_SPIN=200Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by joeypercia on 2026-11-29T07:34:16Z.
On "serial per-item work or contention", thread stacks point at contention: the write watch's one guards lock (
watch::GUARDS).Setup. RTX 4070 Ti 12 GB, Ryzen 7 7800X3D, 32 GB, Windows 11 26200.
mainat568c5e5(release build, matching pdb), Series X, DLSS off, frame generation off, in the world. I took 30 samples of every thread withcdb -pv(non-invasive), one every ~3 s over about 2 minutes. Each sample suspends the process for a moment, so this run's per-frame times are inflated; read the shares, not the milliseconds.What the threads were doing:
victory-submitshadow::wide←wide_each←wide_each_from, i.e. the end of a refresh flush, waiting for helpers.victory-wide-*(6)watch::guards→GUARDS.lock()(viaShadow::update_free→watch::writes→watch::guard). The other 13 were copying (copy_mapped→soft_read,Shadow::copy) or inwatch::kernel_written.victory-list-*(8)So the refresh fan-out has spare helpers, and the time a flush takes is set by its jobs queueing on
GUARDS.guard()takes that lock on its fast path too (g.clean.range(first..last).count() == ...), once per refresh item that isn't sifted out, and holds it acrossprotect()'sVirtualProtectcalls andsoft_runs. The title's write faults wait on the same lock. That fits your C run (two thirds fewer helpers cost only ~12 %) and D (spinning doesn't help: the helpers are awake but blocked).Open PRs that work on that lock, for whoever compares them: #1925 (
GUARDSsplit by block), #1967 / #1561 / #1609 / #653 (the fast path inguard()without thecount(); #1967 and #1561 also skip the secondguards_timed()), #730 and #1044 (spinning ortry_lockon it). I haven't measured any of them.Not measured: with more samples, or on Series S.
(Claude Code, Claude Opus 5.5: took the samples, read the stacks, wrote this.)
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-30T15:43:34Z.
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.