Where a frame goes on an RTX 4090: submitting thread and helpers, measured (static scene) #3905

Open
opened 2026-11-30 11:04:42 +00:00 by dyshay · 4 comments
dyshay commented 2026-11-30 11:04:42 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-30T11:04:42Z.


Follows #2415. This is a measured account of one frame on an RTX 4090 in a static scene (camera still, one character idle), so that the next pieces of work can be ranked by what they would save on the frame, not by what they cost in total CPU.

Set-up

  • RTX 4090 (24 GB), 32 logical processors; Series S profile, 1440p output with DLSS quality, hardware ray tracing on.
  • diag build of main2 at e4f7d4eb, run unattended for 300 s.
  • Sampling profiler (VICTORY_PROFILE=150,270,1,<file>): the 28 busiest threads every millisecond for 120 s (62,841 rounds, so 1.9 ms per round in practice), symbolised against the build's PDB. Frame lines from the log averaged over the same window.
  • 3,321 frames in the window: 36.3 ms per frame on average, median 33.5 ms, p95 about 55 ms.

Summary

  • One thread sets the frame rate: victory-submit. It works 35.2 of every 36.3 ms (queue::behind); the profile finds it running 85 % of the time, and of its waits only 0.19 ms per frame are "nothing to do". The rest are waits inside the work.
  • The card is 58 % busy (about 20.7 ms of measured card time per frame) and sits idle for 14.7 ms per frame while the submitting thread works. The title's render thread sleeps about 15 ms per frame waiting for the present. The list translators (54 %), the relay (59 %) and the wide helpers (93 %) all wait for work.
  • So whatever comes off the submitting thread comes off the frame, down to about 21 ms, where the card takes over.

Measured breakdown (log, averaged over the window)

Re-checked on this run against the figures quoted in #2415; this scene is markedly lighter:

item figure in #2415 this run
copies kept on the card ~21 ms 7.1 ms on the submitting thread; 3.6 ms of card time for our lists that bring them up to date
refreshes ~19 ms, ~80 % in the aliased CPU-less pool 8.8 ms in the lists' steps (5,184 of 6,201 refreshes known to copy nothing), plus 3.3 ms of copies and fills; this build does not log the aliased split
descriptor-heap sync ~16 ms, ~9 of it waiting 8.1 ms of work, 0.2 ms waited for; on the submitting thread 1.5 ms (records and sweep) + 0.5 ms of waits
submission lock ~3 ms 2.7 ms waiting for it on the submitting thread
write watch ~3 ms 3.7 ms on the submitting thread; 234 kernel askings over 1,241 MB per frame (3.8 ms, all threads)

Other lines that matter here: the submitting thread spends 32.1 ms per frame in its submissions (17.0 ms user, 8.1 ms kernel); 18.3 submissions per frame; the write watch checks 8.8 GB per frame of which 8.7 GB (99.4 %) is unchanged; the guards' lock is taken 685 times per frame and waited for 10.7 ms (all threads); the relay copies back for 10.9 ms per frame, beside the submitting thread.

Per-thread profile

CPU ms per frame (thread CPU time / frames), and the share of samples running or waiting (top frame in a wait system call):

thread(s) CPU ms/frame running waiting what it waits on
victory-submit 27.3 85 % 15 % condvar in shadow::wide_each_scoped (its helpers), residency fence
title render thread 22.5 38 % 62 % its own sleep at the present
victory-list-0..7 (8) 148 in all, ~18.5 each 46 % 54 % condvar in list::thin::start (no work)
title audio thread 15.5 41 % 59 % event
victory-relay 13.2 41 % 59 % fence (host::wait_host_fence)
victory-wide-0..7 (8) 26.9 in all 7 % 93 % condvar in shadow::workers (no work)
victory-records-N / victory-under-N (5 + 5) 11.9 / 11.3 in all ~5 % ~95 % condvar
victory-late-wait 5.6 26 % 74 % condvar
victory-heap-sync 4.6 10 % 90 % condvar in descriptor::begin_sync_heaps

The whole process uses about 434 ms of CPU per frame (about 12 logical processors busy), of which about 150 ms is translated title code.

The submitting thread, by function (ms per frame)

Attributed to the innermost of our functions, so driver, kernel and memcpy time is charged to its caller:

function ms/frame notes
Host::submit body and direct calls 6.1 41 % in the driver (18.3 ExecuteCommandLists per frame)
shadow::wide_each_scoped 6.6 3.8 running + 2.9 waiting; see below
Host::card_record + send::Own::record 3.0 recording our lists for copies kept on the card; 57–82 % in the driver
Host::card_take 3.4 2.4 running, of which land::Pool::each (merging fetched pieces, memcpy) 1.7; 0.8 waiting for a new upload buffer to become resident
write watch (watch::kernel_written, ask_rest, nothing_new*, writes, waited) 5–6 2.9 of it is NtGetWriteWatch in the kernel
Vec::retain inlined in Host::submit 1.4 a linear sweep on each of the 18 submissions
allocations destroyed and created in the frame (send::trim, trim_spare_chunks, give_read_back, residency) ~1.5 DestroyAllocation2 / FreeGpuVirtualAddress
lock waits (watch::guards, write trackers, journal) ~1.4
diagnostics only (copystat, the capture's per-frame file check, PNG encoding, meter) ~1.5 not in release builds; the diag build overstates the frame by this much

The refresh fan-out costs more than it saves. In wide_each_scoped the submitting thread does 3.0 ms of the refresh jobs itself, then waits 2.1 ms for the helpers, which do only 2.6 ms of work between the eight of them; waking them costs about 0.6 ms (NtAlertThreadByThreadIdEx), and available_parallelism is asked again on every fan-out (0.16 ms). About 4.7 ms of work takes 6.6 ms of the critical path.

Off the critical path, but expensive on smaller CPUs

The eight list translators use 148 ms of CPU per frame. The largest parts: draw::State::bind 15.5, shadow::lookup 9.0, HostHeap::keep_ref 7.8 (about 6.4 of it in the compare-and-swap of its per-slot Mutex, which points to cache misses on the million-slot array, or false sharing between translators writing neighbouring dynamic slots, four 16-byte slots to a cache line; not proven yet), buffer_srv + make_twinned 8.7 (about 12,000 raw twins per frame), and read-back buffers created every frame (CreateAllocation 2.4, plus 4.4 ms of waiting) and destroyed again on victory-late-wait (2.6).

Already measured

Neutral on the card:

  • #3626 LAND_BATCH
  • ASK_RESERVATION
  • CARD_BUFFERS_MIN_MB=4

Positive:

  • PORT_GUARD: RTX 4090 −2.0 ± 0.9 ms per frame, −5.1 ± 1.3 ms preparing; on a 6-core RTX 3080 Ti machine, lock waits −70 %, −1.5 ms per frame.
  • TEXTURE_HASH_EVERY=64: −1.0 ± 0.6 ms per frame, −2.8 ± 1.2 ms preparing.

Planned work, with expected gains on this scene

The gains are for the submitting thread (= the frame here) and are estimates from the profile, to be confirmed by A/B runs on the card. The order puts the largest proven or near-certain savings first.

  1. Physical-page tracking for aliased views. Ask the write watch once per physical page instead of once per view that maps it: 99.4 % of the 8.8 GB checked per frame is unchanged. Expected −3 to −4 ms (write watch and the "nothing new" checks); more on scenes where refreshes ran to ~19 ms.
  2. Cost of copies kept on the card. Record our lists once per frame rather than per submission, move that recording and the merge of fetched pieces (land::Pool::each, 1.7 ms) off the submitting thread, and keep upload buffers resident instead of waiting for new ones. Expected −3 to −5 ms of the 7.1 ms.
  3. Refresh fan-out (new; ranked by this profile). Run small batches inline, hand the helpers fewer, larger jobs, keep them spinning briefly before they sleep, and cache available_parallelism. Expected −2 to −4 ms.
  4. PORT_GUARD PR. Already measured at −2.0 ± 0.9 ms per frame on the 4090; it takes on the guards' lock (10.7 ms of waiting per frame across threads, about 1.4 ms on the submitting thread here).
  5. Descriptor-heap sync. Off the critical path on this scene (about 0.7–2 ms on the submitting thread), but it was ~16 ms in #2415's scene; keep it on the list, measured on the heavier scene.
  6. Smaller items found by the profile, each about 1–1.5 ms: the Vec::retain sweep in Host::submit; read-back and upload buffers created and destroyed every frame (pool them); fewer, larger submissions (18.3 per frame, 41 % of Host::submit in the driver). Off the frame but worth it on 6-core machines: the per-slot Mutex in HostHeap::keep_ref.

Together, items 1–4 could bring the submitting thread from ~35 ms towards the card's ~21 ms on this scene; each will be measured on its own, with VICTORY_AB A/B runs, before any claim.

Method and caveats

  • A wait is a sample whose top frame is a wait system call (NtWaitForSingleObject, NtWaitForAlertByThreadId for futex locks, condvars and parking, NtDelayExecution, the kernel graphics fence wait). Spinning counts as running.
  • Threads outside the 28 busiest in a given second are not sampled that second, so the running share of the mostly idle pools (wide, records, under, views, land) is overstated.
  • System DLLs were symbolised from their exports only, so internal heap functions in ntdll carry the nearest export's name; the driver is reported as a module.
  • The diag-only statistics and the periodic frame captures add about 1.5 ms per frame on the submitting thread; the sampler's own overhead was not measured.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6694770730 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3905). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-30T11:04:42Z. --- Follows #2415. This is a measured account of one frame on an RTX 4090 in a static scene (camera still, one character idle), so that the next pieces of work can be ranked by what they would save on the frame, not by what they cost in total CPU. ## Set-up - RTX 4090 (24 GB), 32 logical processors; Series S profile, 1440p output with DLSS quality, hardware ray tracing on. - `diag` build of `main2` at e4f7d4eb, run unattended for 300 s. - Sampling profiler (`VICTORY_PROFILE=150,270,1,<file>`): the 28 busiest threads every millisecond for 120 s (62,841 rounds, so 1.9 ms per round in practice), symbolised against the build's PDB. Frame lines from the log averaged over the same window. - 3,321 frames in the window: **36.3 ms per frame** on average, median 33.5 ms, p95 about 55 ms. ## Summary - **One thread sets the frame rate: `victory-submit`.** It works 35.2 of every 36.3 ms (`queue::behind`); the profile finds it running 85 % of the time, and of its waits only 0.19 ms per frame are "nothing to do". The rest are waits *inside* the work. - The card is 58 % busy (about 20.7 ms of measured card time per frame) and sits idle for 14.7 ms per frame while the submitting thread works. The title's render thread sleeps about 15 ms per frame waiting for the present. The list translators (54 %), the relay (59 %) and the wide helpers (93 %) all wait for work. - So whatever comes off the submitting thread comes off the frame, down to about 21 ms, where the card takes over. ## Measured breakdown (log, averaged over the window) Re-checked on this run against the figures quoted in #2415; this scene is markedly lighter: | item | figure in #2415 | this run | |---|---|---| | copies kept on the card | ~21 ms | **7.1 ms** on the submitting thread; 3.6 ms of card time for our lists that bring them up to date | | refreshes | ~19 ms, ~80 % in the aliased CPU-less pool | **8.8 ms** in the lists' steps (5,184 of 6,201 refreshes known to copy nothing), plus 3.3 ms of copies and fills; this build does not log the aliased split | | descriptor-heap sync | ~16 ms, ~9 of it waiting | **8.1 ms** of work, 0.2 ms waited for; on the submitting thread 1.5 ms (records and sweep) + 0.5 ms of waits | | submission lock | ~3 ms | **2.7 ms** waiting for it on the submitting thread | | write watch | ~3 ms | **3.7 ms** on the submitting thread; 234 kernel askings over 1,241 MB per frame (3.8 ms, all threads) | Other lines that matter here: the submitting thread spends 32.1 ms per frame in its submissions (17.0 ms user, 8.1 ms kernel); 18.3 submissions per frame; the write watch checks 8.8 GB per frame of which 8.7 GB (99.4 %) is unchanged; the guards' lock is taken 685 times per frame and waited for 10.7 ms (all threads); the relay copies back for 10.9 ms per frame, beside the submitting thread. ## Per-thread profile CPU ms per frame (thread CPU time / frames), and the share of samples running or waiting (top frame in a wait system call): | thread(s) | CPU ms/frame | running | waiting | what it waits on | |---|---:|---:|---:|---| | `victory-submit` | 27.3 | 85 % | 15 % | condvar in `shadow::wide_each_scoped` (its helpers), residency fence | | title render thread | 22.5 | 38 % | 62 % | its own sleep at the present | | `victory-list-0..7` (8) | 148 in all, ~18.5 each | 46 % | 54 % | condvar in `list::thin::start` (no work) | | title audio thread | 15.5 | 41 % | 59 % | event | | `victory-relay` | 13.2 | 41 % | 59 % | fence (`host::wait_host_fence`) | | `victory-wide-0..7` (8) | 26.9 in all | 7 % | 93 % | condvar in `shadow::workers` (no work) | | `victory-records-N` / `victory-under-N` (5 + 5) | 11.9 / 11.3 in all | ~5 % | ~95 % | condvar | | `victory-late-wait` | 5.6 | 26 % | 74 % | condvar | | `victory-heap-sync` | 4.6 | 10 % | 90 % | condvar in `descriptor::begin_sync_heaps` | The whole process uses about 434 ms of CPU per frame (about 12 logical processors busy), of which about 150 ms is translated title code. ### The submitting thread, by function (ms per frame) Attributed to the innermost of our functions, so driver, kernel and `memcpy` time is charged to its caller: | function | ms/frame | notes | |---|---:|---| | `Host::submit` body and direct calls | 6.1 | 41 % in the driver (18.3 `ExecuteCommandLists` per frame) | | `shadow::wide_each_scoped` | 6.6 | 3.8 running + 2.9 waiting; see below | | `Host::card_record` + `send::Own::record` | 3.0 | recording our lists for copies kept on the card; 57–82 % in the driver | | `Host::card_take` | 3.4 | 2.4 running, of which `land::Pool::each` (merging fetched pieces, `memcpy`) 1.7; 0.8 waiting for a new upload buffer to become resident | | write watch (`watch::kernel_written`, `ask_rest`, `nothing_new*`, `writes`, `waited`) | 5–6 | 2.9 of it is `NtGetWriteWatch` in the kernel | | `Vec::retain` inlined in `Host::submit` | 1.4 | a linear sweep on each of the 18 submissions | | allocations destroyed and created in the frame (`send::trim`, `trim_spare_chunks`, `give_read_back`, residency) | ~1.5 | `DestroyAllocation2` / `FreeGpuVirtualAddress` | | lock waits (`watch::guards`, write trackers, journal) | ~1.4 | | | diagnostics only (copystat, the capture's per-frame file check, PNG encoding, meter) | ~1.5 | not in release builds; the diag build overstates the frame by this much | **The refresh fan-out costs more than it saves.** In `wide_each_scoped` the submitting thread does 3.0 ms of the refresh jobs itself, then waits 2.1 ms for the helpers, which do only 2.6 ms of work between the eight of them; waking them costs about 0.6 ms (`NtAlertThreadByThreadIdEx`), and `available_parallelism` is asked again on every fan-out (0.16 ms). About 4.7 ms of work takes 6.6 ms of the critical path. ### Off the critical path, but expensive on smaller CPUs The eight list translators use 148 ms of CPU per frame. The largest parts: `draw::State::bind` 15.5, `shadow::lookup` 9.0, `HostHeap::keep_ref` 7.8 (about 6.4 of it in the compare-and-swap of its per-slot `Mutex`, which points to cache misses on the million-slot array, or false sharing between translators writing neighbouring dynamic slots, four 16-byte slots to a cache line; not proven yet), `buffer_srv` + `make_twinned` 8.7 (about 12,000 raw twins per frame), and read-back buffers created every frame (`CreateAllocation` 2.4, plus 4.4 ms of waiting) and destroyed again on `victory-late-wait` (2.6). ## Already measured Neutral on the card: - #3626 `LAND_BATCH` - `ASK_RESERVATION` - `CARD_BUFFERS_MIN_MB=4` Positive: - `PORT_GUARD`: RTX 4090 −2.0 ± 0.9 ms per frame, −5.1 ± 1.3 ms preparing; on a 6-core RTX 3080 Ti machine, lock waits −70 %, −1.5 ms per frame. - `TEXTURE_HASH_EVERY=64`: −1.0 ± 0.6 ms per frame, −2.8 ± 1.2 ms preparing. ## Planned work, with expected gains on this scene The gains are for the submitting thread (= the frame here) and are estimates from the profile, to be confirmed by A/B runs on the card. The order puts the largest proven or near-certain savings first. 1. **Physical-page tracking for aliased views.** Ask the write watch once per physical page instead of once per view that maps it: 99.4 % of the 8.8 GB checked per frame is unchanged. Expected **−3 to −4 ms** (write watch and the "nothing new" checks); more on scenes where refreshes ran to ~19 ms. 2. **Cost of copies kept on the card.** Record our lists once per frame rather than per submission, move that recording and the merge of fetched pieces (`land::Pool::each`, 1.7 ms) off the submitting thread, and keep upload buffers resident instead of waiting for new ones. Expected **−3 to −5 ms** of the 7.1 ms. 3. **Refresh fan-out** (new; ranked by this profile). Run small batches inline, hand the helpers fewer, larger jobs, keep them spinning briefly before they sleep, and cache `available_parallelism`. Expected **−2 to −4 ms**. 4. **`PORT_GUARD` PR.** Already measured at −2.0 ± 0.9 ms per frame on the 4090; it takes on the guards' lock (10.7 ms of waiting per frame across threads, about 1.4 ms on the submitting thread here). 5. **Descriptor-heap sync.** Off the critical path on this scene (about 0.7–2 ms on the submitting thread), but it was ~16 ms in #2415's scene; keep it on the list, measured on the heavier scene. 6. **Smaller items found by the profile**, each about 1–1.5 ms: the `Vec::retain` sweep in `Host::submit`; read-back and upload buffers created and destroyed every frame (pool them); fewer, larger submissions (18.3 per frame, 41 % of `Host::submit` in the driver). Off the frame but worth it on 6-core machines: the per-slot `Mutex` in `HostHeap::keep_ref`. Together, items 1–4 could bring the submitting thread from ~35 ms towards the card's ~21 ms on this scene; each will be measured on its own, with `VICTORY_AB` A/B runs, before any claim. ## Method and caveats - A wait is a sample whose top frame is a wait system call (`NtWaitForSingleObject`, `NtWaitForAlertByThreadId` for futex locks, condvars and parking, `NtDelayExecution`, the kernel graphics fence wait). Spinning counts as running. - Threads outside the 28 busiest in a given second are not sampled that second, so the running share of the mostly idle pools (wide, records, under, views, land) is overstated. - System DLLs were symbolised from their exports only, so internal heap functions in `ntdll` carry the nearest export's name; the driver is reported as a module. - The diag-only statistics and the periodic frame captures add about 1.5 ms per frame on the submitting thread; the sampler's own overhead was not measured.
github-actions[bot] commented 2026-11-30 11:04:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-30T11:04:52Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7276505929 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3905#issuecomment-7276505929). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T11:04:52Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
akimfomin commented 2026-11-30 11:18:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by akimfomin on 2026-11-30T11:18:48Z.


@dyshay A matching pressure point from our 4070 Ti SUPER (i5-13600KF), Series X native 1440p, full stock RT, DLSS/FG off, on the moving house route: #3833 removed roughly 25,000 unused raw twins per frame, but the independently measured medians were 13.38 vs 13.42 FPS (test settings and results). The overlapping GPU profile accounted for 66.5 ms/frame of marked work, so I’m keeping CPU refresh and GPU RT results separate. For your refresh fan-out work, is there a PR or preferred threshold to test yet? I can run its isolated A/B on this 13600KF. Counts of refresh batch sizes and parent-thread wait per window would also help select a threshold without relying on total worker time.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7276849709 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3905#issuecomment-7276849709). Originally posted by [akimfomin](https://github.com/akimfomin) on 2026-11-30T11:18:48Z. --- @dyshay A matching pressure point from our 4070 Ti SUPER (i5-13600KF), Series X native 1440p, full stock RT, DLSS/FG off, on the moving house route: #3833 removed roughly 25,000 unused raw twins per frame, but the independently measured medians were 13.38 vs 13.42 FPS ([test settings and results](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3833#issuecomment-7276175840)). The overlapping GPU profile accounted for 66.5 ms/frame of marked work, so I’m keeping CPU refresh and GPU RT results separate. For your refresh fan-out work, is there a PR or preferred threshold to test yet? I can run its isolated A/B on this 13600KF. Counts of refresh batch sizes and parent-thread wait per window would also help select a threshold without relying on total worker time.
dyshay commented 2026-11-30 11:39:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-30T11:39:50Z.


@akimfomin thanks. The fan-out change is up on dyshay/VIctory-NVIDIA fanout: VICTORY_FANOUT_TUNED=1 (off by default, A/B-able). The thread count is read once instead of per fan-out, helpers are woken only in proportion to the measured work of the batch (small batches run inline), and the submitting thread takes chunks instead of a fixed share, so it doesn't sit waiting for helpers to finish. A diagnostics line counts fan-outs, inline batches, helpers woken and the submitting thread's wait. The branch is on top of our fork's main (trustno1 main + our fixes, including PORT_GUARD), so an A/B with VICTORY_AB=15,VICTORY_FANOUT_TUNED isolates it. Our own A/B on the static scene is queued; I'll post it here. Batch-size counts per window are a good idea, and I'll add them if the first A/B is inconclusive.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7277344105 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3905#issuecomment-7277344105). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-30T11:39:50Z. --- @akimfomin thanks. The fan-out change is up on [dyshay/VIctory-NVIDIA `fanout`](https://github.com/dyshay/VIctory-NVIDIA/tree/fanout): `VICTORY_FANOUT_TUNED=1` (off by default, A/B-able). The thread count is read once instead of per fan-out, helpers are woken only in proportion to the measured work of the batch (small batches run inline), and the submitting thread takes chunks instead of a fixed share, so it doesn't sit waiting for helpers to finish. A diagnostics line counts fan-outs, inline batches, helpers woken and the submitting thread's wait. The branch is on top of our fork's main (trustno1 main + our fixes, including PORT_GUARD), so an A/B with `VICTORY_AB=15,VICTORY_FANOUT_TUNED` isolates it. Our own A/B on the static scene is queued; I'll post it here. Batch-size counts per window are a good idea, and I'll add them if the first A/B is inconclusive.
dyshay commented 2026-11-30 18:16:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-30T18:16:20Z.


Our A/B of VICTORY_FANOUT_TUNED (branch fanout), RTX 4090 + i9-13900KF, Series S + hardware RT, static motel save, 15 s phases, 27 neighbouring pairs, draws regressed out:

effect of the switch
frame (phase median) +0.06 ± 0.52 ms
submitting thread, host ms/frame −2.2 ± 1.7 ms
preparing −1.2 ± 0.9 ms

So the submitting thread does a little less, but the frame doesn't move. That fits @burber's point that the refresh is a fork-join on the frame's critical path, and that the submitting thread is blocked for a third of the frame: shuffling chunks between it and the helpers doesn't shorten the join. We're not taking it. Next on our side is finding what the submitting thread waits on, before moving more work. @akimfomin no need to spend a run on the branch.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7287600194 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/3905#issuecomment-7287600194). Originally posted by [dyshay](https://github.com/dyshay) on 2026-11-30T18:16:20Z. --- Our A/B of `VICTORY_FANOUT_TUNED` (branch `fanout`), RTX 4090 + i9-13900KF, Series S + hardware RT, static motel save, 15 s phases, 27 neighbouring pairs, draws regressed out: | | effect of the switch | |---|---| | frame (phase median) | +0.06 ± 0.52 ms | | submitting thread, host ms/frame | −2.2 ± 1.7 ms | | preparing | −1.2 ± 0.9 ms | So the submitting thread does a little less, but the frame doesn't move. That fits @burber's point that the refresh is a fork-join on the frame's critical path, and that the submitting thread is blocked for a third of the frame: shuffling chunks between it and the helpers doesn't shorten the join. We're not taking it. Next on our side is finding what the submitting thread waits on, before moving more work. @akimfomin no need to spend a run on the branch.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA#3905
No description provided.