perf(cores): run the submitting thread's helpers at its priority #22
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/trustno1-coder--VIctory-NVIDIA!22
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-22"
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?
@Indy2l on GitHub · 2026-11-27 08:46 UTC · original
Indy2l:perf/helper-priority→main· +62 −1 · 5 files · 1 commits · merged 2026-11-27 09:31 UTCProblem
The submitting thread runs above normal priority (
queue::behind), but the threads it waits for ran at normal priority: theshadow::widepool (refreshes, snapshots), the pools ofland(landing, title bytes under flights' writes, heap records and views),victory-heap-syncandvictory-aside. They competed on equal terms with the title's threads and the eight list translators.On a six-core CPU (i5-12400F, 12 threads) everything is busy, so while the submitting thread waited for its helpers, they often weren't running. A CPU sampling profile (WPR) of a world session showed the translators alone using about 2.4 cores. The submitting thread was the wall at about 105 ms of a 119 ms frame, and the card was idle about 37 ms a frame behind it.
Change
VICTORY_HELPER_PRIORITY(on unless0) runs those helper threads at above-normal priority, the same as the submitting thread. Each helper re-checks the switch before each piece of work and callsSetThreadPriorityonly when it changes. That meansVICTORY_ABcan flip it while the title runs, which is how it was measured. The change is all incores::Priority, plus one or two lines in each thread loop.Validation
One run with
VICTORY_AB=20,VICTORY_HELPER_PRIORITY(plus a second switch that was dropped), i5-12400F, RTX 3060 12 GB, 16 GB RAM, Series S at 540p withplay-S-540p.ps1. Medians of 5-second windows in the world, about 40 s per setting:The internal timings move the way the profile predicted. The fps gain comes from a short run, so take it as about +10%, not a precise figure.
6a31e43(before the foxhound base), then rebased cleanly onto18a8dc2. Not re-run in game on the new base.cargo test -p victory-gpu --lib, plain and withdiagnostics: all pass exceptindirect::tests::host_list_budget_starts_empty_at_each_submissionandwarp_batch_charges_every_execution, which fail on18a8dc2without this change too.VICTORY_THIN_LOW). Each list call got about 5% slower, with no clear gain on its own, so it's not included.🤖 Generated with Claude Code