Second machine: RX 9070 XT + Ryzen 7 9800X3D, measured on rx9070xt (where a world frame goes) #269

Open
opened 2026-11-26 15:31:45 +00:00 by github-bot · 2 comments
Owner

@⁠thejacte on GitHub · 2026-11-26 15:27 UTC · original

These are measurements from a second machine on rx9070xt. I wanted to know where a world frame's time goes before writing more code, so I don't work on what you are already working on. Everything is from the diagnostics build, which logs all of these numbers.

Machine: RX 9070 XT (driver 32.0.32029.2010), Ryzen 7 9800X3D, 64 GB, Windows 11. Resolution: __ (fill in).
Build: rx9070xt at 81ebb7b, --profile diag --features diagnostics, pipelines made ahead with victory warm --used. Runs used my size-handle switch (VICTORY_SIZE_OWN_HANDLE=1, in my pull request) so that AMD's compiler makes every compute pipeline.
Scene: the same place of the same save each run, about 5 minutes in the world. The numbers are medians over the frame-rate lines with more than 3,000 draws (loading left out).

Modes

play.ps1 Runs Frame (median) 90th % fps Preparing (submitting thread) Copying back Card busy
-Safe 2 62 ms 74 ms 16 41 ms 14 ms 50-57 %
default 1 50 ms 72 ms 20 42 ms 16 ms 60 %
default + VICTORY_CARD_BUFFERS_MIN_KB=64 4 45-52 ms 54-65 ms 19-22 38-40 ms 12-13 ms 56-63 %
-RayTracing 1 103 ms 138 ms 10 39 ms 17 ms 77 %
  • Default is about 20 % faster than -Safe here.
  • VICTORY_CARD_BUFFERS_MIN_KB=64: the first run looked ~4 ms faster, but over four runs (45, 50, 45, 52 ms) it is inside the noise against default. I can't say it helps on this card.
  • No device loss and no errors in any run.

Where a default frame goes (about 45-52 ms)

  • The submitting thread prepares for 38-40 ms of it, and the card waits for it. The card's clock line: about 60 % busy, ~17-20 ms a frame with nothing of ours queued, ~15 ms of that while the submitting thread was working. The submitting thread waited 0.0 ms for the card, and settles 0.0 ms.

  • Of the preparing: ~15 ms refreshing host copies of title memory, ~5 ms copies in the card's memory, ~3.5 ms write-watch askings, ~2 ms putting title bytes under flights' writes, ~3 ms copies and fills. The rest is spread out.

  • Refreshes (I added timing inside Batch::refresh_front, locally): ~16 calls a frame and ~5,900 spans, 12.6 ms wall. 1.1 ms of that is gathering and 10.5 ms is on the threads. On the threads (summed): ~1,030 buffer updates 35 ms (67 MB copied, ~400 of them copy nothing), ~290 textures 3.5 ms, sifting 3.9 ms. wide_threads() gives 4 helpers on this 16-thread CPU, so 5 threads in all.

  • The guards' lock (I counted it locally by the line that takes it). The contended waits add up to ~72 ms a frame over all threads, but the lock is held only ~8 ms a frame:

    • the write-fault handler (the title's threads): ~576 takes a frame, ~47 ms waiting, 3.4 ms held (longest ~2.3 ms);
    • guard() making blocks read-only again: ~12 ms waiting, ~4.4 ms held;
    • publish: ~6 ms waiting.

    So the title's threads queue behind each other and behind the refreshes for every write fault. VICTORY_STORE_BESIDE and VICTORY_COPY_BESIDE look written for exactly this. I haven't tried them yet. Have you measured them?

  • Copying back: 12-16 ms a frame, on its own thread.

  • Pipelines: about 130 draws a frame are dropped in default mode, mostly the ray-tracing structure builder, which is off. Before the size-handle switch, AMD's compiler crashed on 25 compute pipelines here (details in that pull request).

Memory

Over one 5-minute session, private memory grew from ~11 GB to ~36 GB. Near the end Windows had only ~0.4 GB left to commit on this 64 GB machine (it started with ~20 GB). Longer sessions here may hit the commit limit before anything else. This matches "Memory, 40-46 GB private" in findings.md.

What I tried that did not help

  • Skipping empty refreshes earlier in the big flush, and not sorting ranges when the journal is not kept: the frame time did not change. Not proposed.
  • Splitting large copies across more threads: at most ~2 ms (5 threads; take_all already splits runs over 1 MB). Not done.

avatarmanz's renderer patches on this machine

rx9070xt was branched from avatarmanz/VIctory-7900XTX before its five renderer patches (VICTORY_PORT_CONSTANTS, _DESCRIPTORS, _CBV, _GUARD, _JOURNAL, all off by default). I merged avatarmanz main (c9c932c) into rx9070xt locally. There were two conflicts, both where the 9070 XT fixes meet: the magenta filter in ambient.rs (both kept) and the compiler-crash guard in pipeline/make.rs (the guard kept, their timing span added). Shaders were translated and pipelines warmed both ways. Then four runs, all five patches on against all off, alternated, default mode with CARD_BUFFERS_MIN_KB=64:

Run Patches Median frame 90th % fps Draws Preparing Card busy
1 off 47.9 ms 56.3 ms 20.9 6,500 38.5 ms 74 %
2 on 45.7 ms 87.7 ms 21.9 4,300 27.5 ms 52 %
3 off 55.9 ms 67.9 ms 17.9 4,400 40.6 ms 63 %
4 on 39.5 ms 56.3 ms 25.4 5,000 25.6 ms 64 %
  • Median frame ~52 ms to ~43 ms with the patches on (about 18 %). The submitting thread's preparing goes from ~40 ms to ~26 ms. Run 4 (39.5 ms, 25 fps) is the fastest I've seen on this card.
  • All five were active (their per-frame lines in the log): the 185 MB graphics heap in place, ~10,000 tables' constant buffers read in place, the guards' lock shared.
  • No errors and no device loss in any run. The merge alone (runs 1 and 3) is as fast as rx9070xt before it.
  • The time of day changed between runs (run 4 at night), and the draw counts differ. Runs 2-3 are the closest pair (4,300 and 4,400 draws): 45.7 against 55.9 ms.
  • The picture: in run 1 (patches off) some shadows looked odd, which they hadn't before the merge. In run 2 (patches on) they looked better. Seen once, in daylight, not confirmed yet.
  • The first parallel warm with VICTORY_PORT_CBV=1 reported 1,320 of 3,469 pipelines "without a host pipeline". Run again, all 3,469 were made and none were marked bad, and samples run one at a time all built. It looks like a counting quirk with 10 workers, but I haven't pinned it down.

#215 on this machine

I ran #215 (91a914e, on main at 4f62c2a, without #178/#179) with both switches on (VICTORY_LATE_SIGNALS=1, VICTORY_EARLY_PLAN=1) against all off (VICTORY_EARLY_FILLS=0). Two runs each, alternated, same place, its own cache folder. One more run before them only made pipelines.

Run Switches Median frame 90th % fps Preparing On the GPU
1 off 151 ms 284 ms 6.6 46 ms 3.5 ms
2 on 125 ms 392 ms 8.0 33 ms 38 ms
3 off 164 ms 253 ms 6.1 66 ms 1.8 ms
4 on 135 ms 168 ms 7.4 40 ms 33 ms
  • Median frame 157 ms to 130 ms with the switches on (~17 %). Unlike on your 8060S on main alone, the gain shows here without #178/#179. The 90th percentile is mixed: one "on" run was worse and one better.
  • No device loss, no DXGI_ERROR_DEVICE_HUNG. One driver compiler crash in run 2 was caught, and that pipeline left out.
  • On main, the world was black for about the first 1.5 minutes of the first runs, while ~700 pipelines were made (~600 draws a frame dropped). Once they were made, the picture was normal.
  • For scale: rx9070xt on this machine is ~50 ms a frame. There the submitting thread waits ~0 ms for the card (VICTORY_ASYNC_SUBMIT), and the time goes to preparing itself. So I don't know whether #215's idea would help on rx9070xt; on main it does.

Questions

  1. Which branch should my pull requests target, main or rx9070xt?
  2. Is anyone working on splitting the preparing thread (findings.md "What is next" 1)? On this machine it is the limit.
  3. Title memory in place (inplace.rs): is a heap opened on title memory meant to replace host copies for big buffers one day? It would remove most of the refreshes, guards and write faults above. I can run VICTORY_INPLACE_PROBE on this card if that helps.
  4. Should I try VICTORY_STORE_BESIDE=1 / VICTORY_COPY_BESIDE=1 next, and report?

I can share any of the full log lines privately (they hold title addresses, so they don't go into the issue).

**@⁠thejacte** on GitHub · 2026-11-26 15:27 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/269) These are measurements from a second machine on `rx9070xt`. I wanted to know where a world frame's time goes before writing more code, so I don't work on what you are already working on. Everything is from the diagnostics build, which logs all of these numbers. **Machine:** RX 9070 XT (driver 32.0.32029.2010), Ryzen 7 9800X3D, 64 GB, Windows 11. Resolution: __ (fill in). **Build:** `rx9070xt` at `81ebb7b`, `--profile diag --features diagnostics`, pipelines made ahead with `victory warm --used`. Runs used my size-handle switch (`VICTORY_SIZE_OWN_HANDLE=1`, in my pull request) so that AMD's compiler makes every compute pipeline. **Scene:** the same place of the same save each run, about 5 minutes in the world. The numbers are medians over the frame-rate lines with more than 3,000 draws (loading left out). ## Modes | `play.ps1` | Runs | Frame (median) | 90th % | fps | Preparing (submitting thread) | Copying back | Card busy | |---|---|---|---|---|---|---|---| | `-Safe` | 2 | 62 ms | 74 ms | 16 | 41 ms | 14 ms | 50-57 % | | default | 1 | 50 ms | 72 ms | 20 | 42 ms | 16 ms | 60 % | | default + `VICTORY_CARD_BUFFERS_MIN_KB=64` | 4 | 45-52 ms | 54-65 ms | 19-22 | 38-40 ms | 12-13 ms | 56-63 % | | `-RayTracing` | 1 | 103 ms | 138 ms | 10 | 39 ms | 17 ms | 77 % | - Default is about 20 % faster than `-Safe` here. - `VICTORY_CARD_BUFFERS_MIN_KB=64`: the first run looked ~4 ms faster, but over four runs (45, 50, 45, 52 ms) it is inside the noise against default. I can't say it helps on this card. - No device loss and no errors in any run. ## Where a default frame goes (about 45-52 ms) - **The submitting thread prepares for 38-40 ms of it, and the card waits for it.** The card's clock line: about 60 % busy, ~17-20 ms a frame with nothing of ours queued, ~15 ms of that while the submitting thread was working. The submitting thread waited 0.0 ms for the card, and settles 0.0 ms. - Of the preparing: ~15 ms refreshing host copies of title memory, ~5 ms copies in the card's memory, ~3.5 ms write-watch askings, ~2 ms putting title bytes under flights' writes, ~3 ms copies and fills. The rest is spread out. - **Refreshes** (I added timing inside `Batch::refresh_front`, locally): ~16 calls a frame and ~5,900 spans, 12.6 ms wall. 1.1 ms of that is gathering and 10.5 ms is on the threads. On the threads (summed): ~1,030 buffer updates 35 ms (67 MB copied, ~400 of them copy nothing), ~290 textures 3.5 ms, sifting 3.9 ms. `wide_threads()` gives 4 helpers on this 16-thread CPU, so 5 threads in all. - **The guards' lock** (I counted it locally by the line that takes it). The contended waits add up to ~72 ms a frame over all threads, but the lock is held only ~8 ms a frame: - the write-fault handler (the title's threads): ~576 takes a frame, **~47 ms waiting**, 3.4 ms held (longest ~2.3 ms); - `guard()` making blocks read-only again: ~12 ms waiting, ~4.4 ms held; - `publish`: ~6 ms waiting. So the title's threads queue behind each other and behind the refreshes for every write fault. `VICTORY_STORE_BESIDE` and `VICTORY_COPY_BESIDE` look written for exactly this. I haven't tried them yet. Have you measured them? - **Copying back:** 12-16 ms a frame, on its own thread. - **Pipelines:** about 130 draws a frame are dropped in default mode, mostly the ray-tracing structure builder, which is off. Before the size-handle switch, AMD's compiler crashed on 25 compute pipelines here (details in that pull request). ## Memory Over one 5-minute session, private memory grew from ~11 GB to ~36 GB. Near the end Windows had **only ~0.4 GB left to commit** on this 64 GB machine (it started with ~20 GB). Longer sessions here may hit the commit limit before anything else. This matches "Memory, 40-46 GB private" in findings.md. ## What I tried that did not help - Skipping empty refreshes earlier in the big flush, and not sorting ranges when the journal is not kept: the frame time did not change. Not proposed. - Splitting large copies across more threads: at most ~2 ms (5 threads; `take_all` already splits runs over 1 MB). Not done. ## avatarmanz's renderer patches on this machine `rx9070xt` was branched from avatarmanz/VIctory-7900XTX before its five renderer patches (`VICTORY_PORT_CONSTANTS`, `_DESCRIPTORS`, `_CBV`, `_GUARD`, `_JOURNAL`, all off by default). I merged avatarmanz `main` (`c9c932c`) into `rx9070xt` locally. There were two conflicts, both where the 9070 XT fixes meet: the magenta filter in `ambient.rs` (both kept) and the compiler-crash guard in `pipeline/make.rs` (the guard kept, their timing span added). Shaders were translated and pipelines warmed both ways. Then four runs, all five patches on against all off, alternated, default mode with `CARD_BUFFERS_MIN_KB=64`: | Run | Patches | Median frame | 90th % | fps | Draws | Preparing | Card busy | |---|---|---|---|---|---|---|---| | 1 | off | 47.9 ms | 56.3 ms | 20.9 | 6,500 | 38.5 ms | 74 % | | 2 | on | 45.7 ms | 87.7 ms | 21.9 | 4,300 | 27.5 ms | 52 % | | 3 | off | 55.9 ms | 67.9 ms | 17.9 | 4,400 | 40.6 ms | 63 % | | 4 | on | 39.5 ms | 56.3 ms | 25.4 | 5,000 | 25.6 ms | 64 % | - **Median frame ~52 ms to ~43 ms with the patches on (about 18 %).** The submitting thread's preparing goes from ~40 ms to ~26 ms. Run 4 (39.5 ms, 25 fps) is the fastest I've seen on this card. - All five were active (their per-frame lines in the log): the 185 MB graphics heap in place, ~10,000 tables' constant buffers read in place, the guards' lock shared. - No errors and no device loss in any run. The merge alone (runs 1 and 3) is as fast as `rx9070xt` before it. - The time of day changed between runs (run 4 at night), and the draw counts differ. Runs 2-3 are the closest pair (4,300 and 4,400 draws): 45.7 against 55.9 ms. - **The picture:** in run 1 (patches off) some shadows looked odd, which they hadn't before the merge. In run 2 (patches on) they looked better. Seen once, in daylight, not confirmed yet. - The first parallel `warm` with `VICTORY_PORT_CBV=1` reported 1,320 of 3,469 pipelines "without a host pipeline". Run again, all 3,469 were made and none were marked bad, and samples run one at a time all built. It looks like a counting quirk with 10 workers, but I haven't pinned it down. ## #215 on this machine I ran #215 (`91a914e`, on `main` at `4f62c2a`, without #178/#179) with both switches on (`VICTORY_LATE_SIGNALS=1`, `VICTORY_EARLY_PLAN=1`) against all off (`VICTORY_EARLY_FILLS=0`). Two runs each, alternated, same place, its own cache folder. One more run before them only made pipelines. | Run | Switches | Median frame | 90th % | fps | Preparing | On the GPU | |---|---|---|---|---|---|---| | 1 | off | 151 ms | 284 ms | 6.6 | 46 ms | 3.5 ms | | 2 | on | 125 ms | 392 ms | 8.0 | 33 ms | 38 ms | | 3 | off | 164 ms | 253 ms | 6.1 | 66 ms | 1.8 ms | | 4 | on | 135 ms | 168 ms | 7.4 | 40 ms | 33 ms | - **Median frame 157 ms to 130 ms with the switches on (~17 %).** Unlike on your 8060S on `main` alone, the gain shows here without #178/#179. The 90th percentile is mixed: one "on" run was worse and one better. - No device loss, no `DXGI_ERROR_DEVICE_HUNG`. One driver compiler crash in run 2 was caught, and that pipeline left out. - On `main`, the world was black for about the first 1.5 minutes of the first runs, while ~700 pipelines were made (~600 draws a frame dropped). Once they were made, the picture was normal. - For scale: `rx9070xt` on this machine is ~50 ms a frame. There the submitting thread waits ~0 ms for the card (`VICTORY_ASYNC_SUBMIT`), and the time goes to preparing itself. So I don't know whether #215's idea would help on `rx9070xt`; on `main` it does. ## Questions 1. Which branch should my pull requests target, `main` or `rx9070xt`? 2. Is anyone working on splitting the preparing thread (findings.md "What is next" 1)? On this machine it is the limit. 3. Title memory in place (`inplace.rs`): is a heap opened on title memory meant to replace host copies for big buffers one day? It would remove most of the refreshes, guards and write faults above. I can run `VICTORY_INPLACE_PROBE` on this card if that helps. 4. Should I try `VICTORY_STORE_BESIDE=1` / `VICTORY_COPY_BESIDE=1` next, and report? I can share any of the full log lines privately (they hold title addresses, so they don't go into the issue).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 15:31:45 +00:00
Author
Owner

@⁠luisaugustz on GitHub · 2026-11-26 16:57 UTC · original

A third data point, same card and driver, slower CPU.

Machine: RX 9070 XT 16 GB (Adrenalin 26.11.2, driver 32.0.32029.2010), Ryzen 7 5800X, 32 GB, Windows 11. Captured frames are 1920x1080.

Build: rx9070xt at 81ebb7bd plus #252, #235, #231 and avatarmanz 4fd34fd, diagnostics. play.ps1 default (not -Safe) switches, VICTORY_SIZE_OWN_HANDLE=1, also VICTORY_HAIR=1 and VICTORY_TEXTURE_BACK=1.

Method: median of the last 100 frame-rate lines with more than 3,000 draws in each run. These are opening-story scenes driven by scripted keys, not your save or your spot, so compare with care. One run per row.

Run Frame (median) 90th % fps Preparing Copying back Draws Dropped
default 81 ms 85 ms 12.3 72 ms 34 ms ~4,800 ~340
default + VICTORY_PANEL=1 82 ms 95 ms 12.2 74 ms 33 ms ~4,000 ~265
VICTORY_BVH_BUILDER=1 + VICTORY_BVH_QUARANTINE=1 114 ms 135 ms 8.8 104 ms 47 ms ~5,100 0
VICTORY_BVH_BUILDER=1, no quarantine, VICTORY_AMBIENT=0 120 ms 149 ms 8.4 84 ms 45 ms ~4,800 0
  • The no-quarantine run was still going, with no errors, at 23 minutes, and had walked from the cell through the corridor to the common room. Ceiling lamps light the corridor walls, close to a console screenshot of the same place. Video memory sat at or just over the budget (13.9 of 13.7 GB in the panel). The cell wall beside the window still looks darker and bluer than on console.
  • The two default runs and the quarantine run had no device loss and no compiler crashes.
  • The quarantine run ended after about 13 minutes with an access violation in the title's own code (+0x23cf683, write to 0). We have seen the same address in earlier runs on main builds without this stack, so I do not blame ray tracing for it.
  • One earlier builder run (no quarantine) ended in a hard reset of the whole PC about 2 minutes in. This PC has a history of unexplained restarts and CPU machine-check events from before any of this, so I cannot say what caused it.
  • Our preparing time is close to twice yours, which fits your finding that the submitting thread is the limit.

I have not tried VICTORY_STORE_BESIDE or VICTORY_COPY_BESIDE.

**@⁠luisaugustz** on GitHub · 2026-11-26 16:57 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/269#issuecomment-7198305309) A third data point, same card and driver, slower CPU. **Machine:** RX 9070 XT 16 GB (Adrenalin 26.11.2, driver 32.0.32029.2010), Ryzen 7 5800X, 32 GB, Windows 11. Captured frames are 1920x1080. **Build:** `rx9070xt` at `81ebb7bd` plus #252, #235, #231 and avatarmanz `4fd34fd`, diagnostics. `play.ps1` default (not `-Safe`) switches, `VICTORY_SIZE_OWN_HANDLE=1`, also `VICTORY_HAIR=1` and `VICTORY_TEXTURE_BACK=1`. **Method:** median of the last 100 frame-rate lines with more than 3,000 draws in each run. These are opening-story scenes driven by scripted keys, not your save or your spot, so compare with care. One run per row. | Run | Frame (median) | 90th % | fps | Preparing | Copying back | Draws | Dropped | |---|---|---|---|---|---|---|---| | default | 81 ms | 85 ms | 12.3 | 72 ms | 34 ms | ~4,800 | ~340 | | default + `VICTORY_PANEL=1` | 82 ms | 95 ms | 12.2 | 74 ms | 33 ms | ~4,000 | ~265 | | `VICTORY_BVH_BUILDER=1` + `VICTORY_BVH_QUARANTINE=1` | 114 ms | 135 ms | 8.8 | 104 ms | 47 ms | ~5,100 | 0 | | `VICTORY_BVH_BUILDER=1`, no quarantine, `VICTORY_AMBIENT=0` | 120 ms | 149 ms | 8.4 | 84 ms | 45 ms | ~4,800 | 0 | - The no-quarantine run was still going, with no errors, at 23 minutes, and had walked from the cell through the corridor to the common room. Ceiling lamps light the corridor walls, close to a console screenshot of the same place. Video memory sat at or just over the budget (13.9 of 13.7 GB in the panel). The cell wall beside the window still looks darker and bluer than on console. - The two default runs and the quarantine run had no device loss and no compiler crashes. - The quarantine run ended after about 13 minutes with an access violation in the title's own code (`+0x23cf683`, write to 0). We have seen the same address in earlier runs on `main` builds without this stack, so I do not blame ray tracing for it. - One earlier builder run (no quarantine) ended in a hard reset of the whole PC about 2 minutes in. This PC has a history of unexplained restarts and CPU machine-check events from before any of this, so I cannot say what caused it. - Our preparing time is close to twice yours, which fits your finding that the submitting thread is the limit. I have not tried `VICTORY_STORE_BESIDE` or `VICTORY_COPY_BESIDE`.
Author
Owner

@⁠luisaugustz on GitHub · 2026-11-26 17:50 UTC · original

Correction to my comment above. I wrote that the quarantine run ended in an access violation in the title's own code and that I did not blame ray tracing for it. I had not searched that log properly: it has about 950 no shared buffer ... (0x8007000E) out-of-memory warnings before the crash. So that run ran out of memory with the builder on, and the access violation at +0x23cf683 came after that.

Two later builder runs without quarantine also failed with the same out-of-memory warnings, after roughly 26 to 28 minutes on 32 GB / 16 GB. VICTORY_MEMORY_CARD_MB=2048 did not prevent it in one run. The earlier main runs with the same crash address have no such warnings, so the address alone does not identify a cause.

**@⁠luisaugustz** on GitHub · 2026-11-26 17:50 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/269#issuecomment-7199755364) Correction to my comment above. I wrote that the quarantine run ended in an access violation in the title's own code and that I did not blame ray tracing for it. I had not searched that log properly: it has about 950 `no shared buffer ... (0x8007000E)` out-of-memory warnings before the crash. So that run ran out of memory with the builder on, and the access violation at `+0x23cf683` came after that. Two later builder runs without quarantine also failed with the same out-of-memory warnings, after roughly 26 to 28 minutes on 32 GB / 16 GB. `VICTORY_MEMORY_CARD_MB=2048` did not prevent it in one run. The earlier `main` runs with the same crash address have no such warnings, so the address alone does not identify a cause.
This discussion has been locked. Commenting is limited to contributors.
No description provided.