Drop retired host objects on a thread of their own (VICTORY_REAPER=1) #247
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/TaynanGT--Vice-Tay!247
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-247"
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?
@CristianCiubancan on GitHub · 2026-11-27 12:01 UTC · original
CristianCiubancan:perf/reaper-thread→main· +151 −1 · 1 files · 2 commits · openOne commit on
mainat63e2c98. Off by default.What
What
burydrops was dropped by the thread that had just landed a flight. WithVICTORY_REAPER=1the objects go to a list and a thread of ours (victory-reaper) drops them, handed over at the moment they were dropped before, never earlier.VICTORY_AB=<s>,VICTORY_REAPERdoes each in turn in one run. It follows the switch of the same name in fxceless/victory-fork, which this tree did not have; here it coversburyonly.Why
On an RTX 5070 Ti the first minutes in the world ran at 8 to 9 fps and then went to 17 to 20 by themselves, in every run. In the slow stretch the card was about 29 % busy and the submitting thread stood waiting for flights: 54 ms a frame in settles (
lists in the air29.5 ms,title memory read24.8 ms), with the relay's line at 102 ms of landing a frame against 25 ms later in the same run.A
VICTORY_PROFILEwindow over that stretch put the relay thread 79 % of its samples inhost::bury→drop<Vec<(u64, Retired)>>→D3D12Core→nvwgf2umx→win32u. While the world streams in the title lets go of thousands of objects a second, and each drop is a call into the driver on the thread everything else was waiting for. On the reaper the same drops cost about 1 µs each (1.17 million in 0.62 s of that thread in one run), so it is not the drops themselves that are slow there.Measured
RTX 5070 Ti 16 GB (driver 32.0.16.1088), Ryzen 7 9850X3D, 32 GB, Windows 11. Diagnostics build of this branch, Series S,
-Machine 4070 -WindowedwithVICTORY_PIPELINE_WORKERS=8, shaders translated and pipelines warmed ahead. A self-driven run: the same copy of the saves each time,EnterthroughVICTORY_KEYS_FILEuntil the world draws, then a fixed route of scripted keys for 300 s. Runs alternated without, with, without, with. Figures are from the once-a-second frame lines over 1,000 draws, the first four left out.The slow stretch lasted about 35 s in the first run without the switch and about 2.5 minutes in the second; neither run with it has one. On the base I first measured on (
3da964a, two runs each way, same route) it lasted 3 to 4 minutes without the switch: medians 9.5 and 12.6 fps without, 18.1 and 19.2 with, and peak private memory 24.8 and 23.4 GB against 21.3 and 21.3 GB.No errors and no device loss in any of the runs.
Limits
play.ps1; that is left for you to judge from other cards.Checks
cargo test -p victory-gpu --locked --lib reaper_testspasses (two tests: dropped here without the switch, and by the thread of that name with it).cargo clippy --workspace --all-targets --locked -- -D warningsand the same with--all-featuresare clean.cargo xtask policypasses.Aside, not from this change:
host::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_bytesfailed in 4 of 8 runs ofcargo test -p victory-gpu --libon unmodified3da964ahere (default configuration, tests in parallel), and passes alone.🤖 Generated with Claude Code
@TaynanGT on GitHub · 2026-11-27 12:03 UTC · original · edited 2026-11-27 12:15 UTC
@CristianCiubancan The reported p10 went from 15.3/7.0 to 17.5/17.8 FPS, and the mean relay landing time moved down in both pairs. I added
599ff9dto cap queued and in-progress releases at 16,384 objects. An excess batch releases on the caller after the same flight fence. Three isolated tests passed, and the Windows CI run is queued. The same-route FPS and shutdown drain checks are still open for this revision.github-bot referenced this pull request2026-11-27 13:47:49 +00:00
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.