Ray tracing on by default (368967f): the structure builder adds a start-up phase of several minutes and a settled cost that varies between runs of the same scene (RTX 4070 SUPER 12 GB) #1521

Open
opened 2026-11-28 19:36:28 +00:00 by HyperEndgame · 1 comment
HyperEndgame commented 2026-11-28 19:36:28 +00:00 (Migrated from github.com)
Contributor

Imported from fxceless/victory-fork. Originally posted by HyperEndgame on 2026-11-28T19:36:28Z.


Measurements of main at 368967f with the structure builder on and off, on one PC: RTX 4070 SUPER 12 GB, Ryzen 7 7700X, 32 GB RAM, Windows 11. Diagnostics build, started through victory play (its own settings, --dlss off). The only switch between runs is --set VICTORY_BVH_BUILDER=0. Every run is an unattended start into the first room after the opening cutscene, and the camera stays on the same view. Frame times are the median of VICTORY_TIMER_LOG=1's 5-second means, after the first 120 s.

Frame times

Profile, window, logging Builder Settled frame time
Series X (1080 to 1440), windowed off 36 ms, 36 ms
Series X, windowed on 124 ms (12 min); one 5-min run 281 ms, with its last 20 s at 60 ms
Series X, windowed, copystat on off 60 ms
Series X, windowed, copystat on on 116 ms, 188 ms (two 12-min runs)
Series S, borderless, copystat on off 35 ms
Series S, borderless, copystat on on 50-65 ms for about 4 min, then 140-200 ms, in one run
  • Start-up phase. With the builder on, every run spends its first 3.5 to 4.5 minutes in the world at about 280-640 ms a frame. Builder-off runs have about 1 minute at about 300 ms. During the builder's phase the picture was dark and smeared.
  • The settled cost varies. On the same view it varies between runs and can change in the middle of a run. In the one pair that was watched, the slow run showed heavy ghosting and shifting light, and the fast one looked right.
  • The CPU side does not change. Its meters match in fast and slow stretches: 16 submissions, about 38-40k list calls and about 5-6k title copies a frame. What changes is copystat's frame account, the time from the last submission to the present. At Series S it is 5-25 ms in the fast stretch and 100-160 ms in the slow one, in the same run. At Series X it is about 45-70 ms in one run and 95-190 ms, rising, in another.
  • Memory. The builder adds about 0.8 GB of VRAM at Series X (10.8 to 11.6 GB) and 1.1 GB at Series S (9.9 to 11.0 GB). It adds about 5 GB of private memory (26 to 31 GB at Series X), 1.8 GB of it host copies of title memory. Across the Series S switch from fast to slow, VRAM use stayed flat at 11.0 GB and free RAM at about 3.7 GB, so a change in memory use does not explain the switch. These figures are nvidia-smi's; they do not show the WDDM budget.
  • Card time. With VICTORY_GPU_TIMING=1 (Series S), builder on against off: 107 ms against 87 ms. Timing waits on every submission, which is why builder off rises from 35 to 87 ms. The card's waits are about 62 ms against 41 ms a frame. Most of the difference is in a 14-list submission group seen only with the builder on: 13-17 ms a frame, with single waits up to 70 ms. That run did not enter a slow stretch.
  • Zero reads. memory.rs's "shaders touched pages that had no copy (those accesses read 0 or were dropped)" fires in every builder-on run: a burst when the builder starts, then lines starting at 0x10000. The counts differ up to 2x between runs, but they do not move with the slowdown.
  • Crashes. None, and no device removal, in 12 runs of 5-12 minutes (7 with the builder on).

Next on my side: a builder-off control as long as the slow runs (12 min, to rule out heat or clocks), clocks and throttle reasons in the sampler, and card timing taken only once a slow stretch has begun, to name the programs that grow. If anyone sees the same fast/slow split on another card, the frame account line from both stretches would help.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6670259044 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1521). Originally posted by [HyperEndgame](https://github.com/HyperEndgame) on 2026-11-28T19:36:28Z. --- Measurements of main at `368967f` with the structure builder on and off, on one PC: RTX 4070 SUPER 12 GB, Ryzen 7 7700X, 32 GB RAM, Windows 11. Diagnostics build, started through `victory play` (its own settings, `--dlss off`). The only switch between runs is `--set VICTORY_BVH_BUILDER=0`. Every run is an unattended start into the first room after the opening cutscene, and the camera stays on the same view. Frame times are the median of `VICTORY_TIMER_LOG=1`'s 5-second means, after the first 120 s. **Frame times** | Profile, window, logging | Builder | Settled frame time | |---|---|---| | Series X (1080 to 1440), windowed | off | 36 ms, 36 ms | | Series X, windowed | on | 124 ms (12 min); one 5-min run 281 ms, with its last 20 s at 60 ms | | Series X, windowed, copystat on | off | 60 ms | | Series X, windowed, copystat on | on | 116 ms, 188 ms (two 12-min runs) | | Series S, borderless, copystat on | off | 35 ms | | Series S, borderless, copystat on | on | 50-65 ms for about 4 min, then 140-200 ms, in one run | - **Start-up phase.** With the builder on, every run spends its first 3.5 to 4.5 minutes in the world at about 280-640 ms a frame. Builder-off runs have about 1 minute at about 300 ms. During the builder's phase the picture was dark and smeared. - **The settled cost varies.** On the same view it varies between runs and can change in the middle of a run. In the one pair that was watched, the slow run showed heavy ghosting and shifting light, and the fast one looked right. - **The CPU side does not change.** Its meters match in fast and slow stretches: 16 submissions, about 38-40k list calls and about 5-6k title copies a frame. What changes is copystat's frame account, the time from the last submission to the present. At Series S it is 5-25 ms in the fast stretch and 100-160 ms in the slow one, in the same run. At Series X it is about 45-70 ms in one run and 95-190 ms, rising, in another. - **Memory.** The builder adds about 0.8 GB of VRAM at Series X (10.8 to 11.6 GB) and 1.1 GB at Series S (9.9 to 11.0 GB). It adds about 5 GB of private memory (26 to 31 GB at Series X), 1.8 GB of it host copies of title memory. Across the Series S switch from fast to slow, VRAM use stayed flat at 11.0 GB and free RAM at about 3.7 GB, so a change in memory use does not explain the switch. These figures are nvidia-smi's; they do not show the WDDM budget. - **Card time.** With `VICTORY_GPU_TIMING=1` (Series S), builder on against off: 107 ms against 87 ms. Timing waits on every submission, which is why builder off rises from 35 to 87 ms. The card's waits are about 62 ms against 41 ms a frame. Most of the difference is in a 14-list submission group seen only with the builder on: 13-17 ms a frame, with single waits up to 70 ms. That run did not enter a slow stretch. - **Zero reads.** `memory.rs`'s "shaders touched pages that had no copy (those accesses read 0 or were dropped)" fires in every builder-on run: a burst when the builder starts, then lines starting at `0x10000`. The counts differ up to 2x between runs, but they do not move with the slowdown. - **Crashes.** None, and no device removal, in 12 runs of 5-12 minutes (7 with the builder on). Next on my side: a builder-off control as long as the slow runs (12 min, to rule out heat or clocks), clocks and throttle reasons in the sampler, and card timing taken only once a slow stretch has begun, to name the programs that grow. If anyone sees the same fast/slow split on another card, the frame account line from both stretches would help.
HyperEndgame commented 2026-11-28 20:23:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from fxceless/victory-fork. Originally posted by HyperEndgame on 2026-11-28T20:23:38Z.


The start-up phase above is mostly pipelines being compiled again at every start. 9e90746 fixed that ("static samplers take their places in the driver's table in one kept order"), but 368967f dropped it: pipeline/sampler_order.rs is not in main's tree, and the only thing left in its place is the skip-the-library workaround in library.rs. Was that drop intended?

During the builder-on start-up on 368967f (Series S, borderless):

  • For about 3 minutes, the recording threads wait out the whole pipeline wait budget every frame (500 ms, VICTORY_PIPELINE_WAIT_MS). The process uses 3.2-5.7 s of CPU a frame across all threads, against about 0.34 s once settled.
  • The card draws about 55 W, against about 100 W once settled.

With 9e90746 cherry-picked onto 368967f (it applies cleanly apart from the README), on the same machine and settings, builder on, 8-minute runs:

First run with the fix Second run
slow_this_run 39 0
new_static_samplers 171 0
Waiting for pipelines, per frame 155 ms in one reading, otherwise near 0 46 ms once, otherwise 0
Time in the world until 5-second means hold under 60 ms about 80 s (means of 60-430 ms before) about 75 s (55-420 ms)
Settled 42 ms 43 ms

For comparison, the same start on 368967f without the fix: 500 ms of waiting for about 3 minutes, about 210 s in the world before frames settle, then 42 ms. Five builder-on runs without the fix all spent about 3.5 to 4 minutes in the world at 265-640 ms a frame, each with the pipeline library loaded from the run before. Builder off settles at 35-36 ms.

The split between fast and slow stretches in the settled phase is a separate question. There was no slow stretch in these two runs, or in a 12-minute run without the fix. These runs were only 8 minutes long, though, and in the earlier run with a slow stretch it began about 8 minutes in, so they do not show whether the fix affects it.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7245253469 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1521#issuecomment-7245253469). Originally posted by [HyperEndgame](https://github.com/HyperEndgame) on 2026-11-28T20:23:38Z. --- The start-up phase above is mostly pipelines being compiled again at every start. 9e90746 fixed that ("static samplers take their places in the driver's table in one kept order"), but `368967f` dropped it: `pipeline/sampler_order.rs` is not in main's tree, and the only thing left in its place is the skip-the-library workaround in `library.rs`. Was that drop intended? During the builder-on start-up on `368967f` (Series S, borderless): - For about 3 minutes, the recording threads wait out the whole pipeline wait budget every frame (500 ms, `VICTORY_PIPELINE_WAIT_MS`). The process uses 3.2-5.7 s of CPU a frame across all threads, against about 0.34 s once settled. - The card draws about 55 W, against about 100 W once settled. With 9e90746 cherry-picked onto `368967f` (it applies cleanly apart from the README), on the same machine and settings, builder on, 8-minute runs: | | First run with the fix | Second run | |---|---|---| | `slow_this_run` | 39 | 0 | | `new_static_samplers` | 171 | 0 | | Waiting for pipelines, per frame | 155 ms in one reading, otherwise near 0 | 46 ms once, otherwise 0 | | Time in the world until 5-second means hold under 60 ms | about 80 s (means of 60-430 ms before) | about 75 s (55-420 ms) | | Settled | 42 ms | 43 ms | For comparison, the same start on `368967f` without the fix: 500 ms of waiting for about 3 minutes, about 210 s in the world before frames settle, then 42 ms. Five builder-on runs without the fix all spent about 3.5 to 4 minutes in the world at 265-640 ms a frame, each with the pipeline library loaded from the run before. Builder off settles at 35-36 ms. The split between fast and slow stretches in the settled phase is a separate question. There was no slow stretch in these two runs, or in a 12-minute run without the fix. These runs were only 8 minutes long, though, and in the earlier run with a slow stretch it began about 8 minutes in, so they do not show whether the fix affects it.
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
fxceless/victory-fork#1521
No description provided.