Fewer stalls while a scene streams: residency waits for textures only, the 64 KiB buffer store refilled on a full card #4644
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4644"
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 isgti07-hub on 2026-12-01T00:35:22Z.
What it changes
Two causes of frames over 100 ms while driving through the city, found by matching the stall seconds against the log:
1. Residency waits for plain buffers. Every new buffer was made resident and waited for before use: 110,600 waits, 20.9 s in a session (the longest 48.8 ms), clustered in the stall seconds. The launcher now sets
VICTORY_WAIT_RESIDENT=textures(from #654, opt-in): texture blocks and textures are still waited for, where the device losses of 2026-11-25 lay; plain buffers are not. After: 1,200 waits, 0.2 s.2. The store of 64 KiB buffers made ahead was never refilled.
ahead::fillmade card buffers only while the card was under 70% of its budget. The texture queue fills the card to 95% (ours sat at 90-92%), so once a world had loaded the store was never filled again, and every 64 KiB title buffer asked for while driving was made when asked for, in the frame: stall seconds came with 35 such buffers a second against 6 in the others. New switches, defaults as before:VICTORY_AHEAD_CARD_PCT(70): the share of the budget the store refills up to. The launcher sets 95.VICTORY_BUFFERS_KEPT(1024): how many are kept after the first lot. The launcher sets 2048 (128 MB at most on the card).VICTORY_AHEAD_NORMAL(off: below normal): the refill thread at normal priority, so busy frames don't starve it. The launcher sets 1.How it was tested
cargo testpassed for the crates it touches: yes,cargo build --release --locked -p victoryandcargo test --release --locked -p victory-gpu --lib ahead::on9107e536: 13 passed, 0 failed.9107e536, on main7d93ee07.Checked for overlap
VICTORY_WAIT_RESIDENT,ahead.rsand the buffers made ahead. Related: #2015 (open: also editsahead::fill, reclaiming idle store buffers under pressure on small hosts; the two would need a merge infill), #4319 (open: residency waits on the list threads, by making memory ahead; complementary), #654 (merged: addedVICTORY_WAIT_RESIDENT=textures). Other open pull requests touchahead.rs(#1562, #2671, #3503, #3074) for other reasons.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-12-01T06:05:40Z.
Tested this commit on its own (
9107e536), one build with the launcher's settings set by--set. RTX 3090 24 GB, driver 610.88, i9-14900K, 32 GB, Series S, DLSS performance, no frame generation or ray tracing. City save, off-screen, the same scripted walk every start (forward, strafe, back), 6 minutes in the world, measured from 60 s after the world loaded. A warm-up start came first, and every arm used the same warm cache.A note first: on current
main, a card whose driver refuses some compute pipelines (#4127, #4630) gets the #2469 retry storm, and that alone puts a frame over 100 ms into about 9 of 10 seconds. My first round on your branch measured 267 slow seconds in both arms and was no use. So the runs below have #4694 applied locally on top (make.rsonly, no overlap withahead.rs). If your before/after was measured on main and your 5090's driver refuses those pipelines too, the storm may be in your numbers as well.VICTORY_WAIT_RESIDENT=texturesonly, 2 startsaheadsettings only (95 %, 2048, normal priority), 2 startsWhat I'd take from it, with the start-to-start spread in mind (defaults alone span 14–50 slow seconds and 22–30 fps):
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tillo88 on 2026-12-01T12:07:02Z.
I queued this PR on my replay bench, but it does not merge on top of v2026.11.30.03, the latest release (merge conflict), so there are no numbers from it yet. I'll try again on the next release.
Measured unattended on a replay bench (same save, recorded controller input via VICTORY_INPUT_REPLAY); numbers and text prepared with Claude.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by andrewpozdnakov7-jpg on 2026-12-01T12:10:40Z.
For the replay bench, I applied the single change
9107e536to the exactv2026.11.30.03release commite1251c31. Release-based commit1693e69cb5a147cd25edae1bf30679f253aa8ca7The patch ID and Git author match. The release's independent allocation backoff remains in place, the launcher parses under Windows PowerShell 5.1, and the staged policy passed for both files.
The defaults in this patch are in
scripts/play-nvidia.ps1. If the replay harness uses nativevictory play, the matching benchmark arm needsVICTORY_WAIT_RESIDENT=textures,VICTORY_AHEAD_CARD_PCT=95,VICTORY_BUFFERS_KEPT=2048, andVICTORY_AHEAD_NORMAL=1. The next step is the same-route measurement on the bench.AI-assisted with OpenAI Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by isgti07-hub on 2026-12-01T13:26:29Z.
Thanks for the careful runs, and for testing the commit on its own.
On the retry storm: my driver doesn't refuse those pipelines, so it isn't in my numbers. Every session I measured ends with
pipeline failures: 0 host pipelines failed (none), 0 shaders do not translate failed=0 untranslated=0 retried=0 retry_made=0, and the per-seconddraws dropped per framelines show 0.0 for "no host pipeline" throughout.Your reading matches mine: part 1 (
VICTORY_WAIT_RESIDENT=textures) is the part that carries the gain, and part 2 (theaheadstore) only matters on a card near its budget, which a 24 GB card in Series S mode isn't. I'm happy to split part 2 into its own PR, or drop it, if the maintainers would rather take part 1 alone.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by tillo88 on 2026-12-01T16:58:57Z.
@andrewpozdnakov7-jpg here is the same-route measurement on v2026.11.30.03, two arms against the release as it is:
VICTORY_WAIT_RESIDENT=textures(no build change; the setting is already in the release).1693e69cbuilt, with the four settings from your comment (VICTORY_WAIT_RESIDENT=textures,VICTORY_AHEAD_CARD_PCT=95,VICTORY_BUFFERS_KEPT=2048,VICTORY_AHEAD_NORMAL=1); the log header lists all four.The setting acts in both arms: the bare release logs "new memory waited for ... 51,000–52,000 times, 17.1–17.6 s, the longest 111–207 ms" over a whole run, while with it the log has "new card memory waited for until it is mapped ... 800 times, 107–118 ms, the longest 8–11 ms" instead.
a host command list did not close (0x80070057), one second after the masked twin[mesh 480d53fc48107a50, pixel f41ec9d9437c021c-mask]was made at the prison → plane cutscene cut. That is the known crash of #2237. On the bare release it happens at that cut in 5 of 47 runs here (plus 3 about 20 s later and 3 elsewhere), so 3 of 3 is well above that rate. Nothing in the log lines before the error differs from the bare release's crashes. And the crashes cluster in time: the three bare-release runs made just before this job (16:02–16:22 local) passed the cut, but the two control runs made right after it (17:06–17:11) both stopped at the cut in the same way, and with parts 1 + 2 (same setting, 16:41–17:01) the warm-up and the two measured runs passed it. With the setting, 3 of 7 runs stopped at the cut. I can't put this on the setting from these runs.relay: the device was lost, before the cut and before the masked twin was made. The bare release has had 3 such stops elsewhere on the route in 47 runs.The latest release is now a test build (v2026.12.01.01-test, a texture and video memory rework), so I'll measure part 1 again with complete runs on the next regular release.
Setup: Ryzen 7 9800X3D, RTX 5070 Ti 16 GB (driver 621.40), 32 GB RAM, Windows 11, release build, Series X 1440p, DLSS Quality, frame generation off, ray tracing off. Same save restored before each run (start of the game), prison cutscene, plane cutscene, first boat section, about 6 minutes; warm-up runs not counted for speed.
Measured unattended on a replay bench (same save, recorded controller input via VICTORY_INPUT_REPLAY); numbers and text prepared with Claude.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:35:53Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed