RTX 3090 / 32 GB (NVIDIA): a-publier cd8dfc0 at 2-3 fps; port 1 works on NVIDIA; the card's memory counts against the commit limit one for one #333

Open
opened 2026-11-26 20:38:38 +00:00 by github-bot · 5 comments
Owner

@⁠JFIREonFIRE on GitHub · 2026-11-26 20:34 UTC · original

An NVIDIA data point for the board, and a measurement that explains why 32 GB PCs hit the commit limit (#297, #298).

Machine: i9-9900K, 32 GB RAM (system-managed page file, 3 GB allocated, commit limit 34.8 GB), RTX 3090 24 GB (driver 32.0.16.2101, ReBAR on), Windows 11.

1. a-publier at cd8dfc0 on the RTX 3090

Built with cargo build --locked --profile diag -p victory --features diagnostics, settings of scripts/play.ps1 (not -Safe) plus VICTORY_PANEL=1, Series S profile, shaders put in the store with victory shaders and warm --used after a pipeline-book run. 4-minute runs in the prison, Lucia walking (frame line of the log, samples with ≥ 2,000 draws a frame):

run settings beyond play.ps1 mean median real RAM (2nd half) VRAM
first warm run – 545 ms 573 ms 23.0 GB 10.0 GB
second warm run – 532 ms 366 ms 22.9 GB 10.2 GB
VICTORY_FALLBACK_HEAPS=1 370 ms 330 ms 22.7 GB 10.7 GB
fallback heaps + PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1 515 ms 402 ms 22.6 GB 9.8 GB

The picture is right (lit prison, no black frames), but recording is the cost: about 40,000 list calls a frame take ~2,000 ms of all recording threads together, where the same scene on a codec-d/cool_fox-based tree takes ~1,000 ms. With the five renderer ports on it got slower on this card (copy back 136 ms a frame). For comparison, the cool_fox-based tree on this PC: 121 ms mean, 92 ms median over 11 minutes.

2. Renderer port 1 works on NVIDIA

86dc109, 4b82f6c and 9c23e8d apply cleanly to cool_fox f4b48ad. On the RTX 3090 the 185 MB stretch is opened in place (OpenExistingHeapFromAddress1 works on this driver): 1 regions ... in place (185 MB), nothing refused. The copy of that buffer, which was the largest one there (copied from 0x40a90000+0xae00000: 7.6x/frame, 1395 MB/frame, 5.4-8.4 ms/frame), is gone. No black frames, no device removal.

3. Why 32 GB PCs hit the commit limit: the card's memory counts against it one for one

Across six runs of the cool_fox-based tree that reached the world (about 380 of the log's memory lines), a least-squares fit of the process's private bytes against the log's own counters:

fit VRAM in use card data in the PC's memory R²
private bytes 1.02–1.11 per MB 0.93–1.13 per MB 0.9997–1.000
working set 0.09–0.32 per MB 1.4–1.8 per MB 0.95–0.99

So of "38–42 GB private" about 20 GB is the commit charge of the card's own memory, which is not resident in RAM: the working set peaked at 21–25 GB. The texture cache that keeps textures for 10 minutes while the card is under 88% (vram_keep) therefore fills commit as well as VRAM.

With a system-managed page file, the commit headroom stays pinned near the residency module's line whatever is cut: with VICTORY_TEXTURE_KEEP=0 the card held 6 GB less and private bytes fell 5.3 GB, but the headroom rose only 0.4 GB (the page file just grew less). next_pressure turns on at ≤ 4 GiB of commit and off only at ≥ 6 GiB and ≥ 5 GiB of free RAM, so on this PC it turned on once in every run (with 12 GB of physical memory still free) and never off. Frames while the headroom was under 1.5 GB:

run headroom < 1.5 GB headroom ≥ 1.5 GB
A 414 ms 108 ms
B 449 ms 184 ms
C 716 ms 422 ms

What helped here, as a local switch (not proposed as is): judging pressure by free physical memory alone, with the emergency commit floor at 256 MiB instead of 1.5 GiB. Together with VICTORY_WINDOWS_BAR_MB=4096 and port 1, over 11 minutes against the same build without them: mean 138 → 121 ms, p90 211 → 189 ms, worst 5 s sample 1,250 → 900 ms, working set (2nd half) 20.2 → 18.3 GB, peak 24.5 → 22.7 GB. VICTORY_WINDOWS_BAR_MB alone moved ~2.3 GB of windows from the PC's memory to the card's, without the black flicker it showed together with another local change.

A possible direction for #297: on 32 GB PCs the commit limit, not the RAM, is what runs out first, and most of the commit is the card's.

Measured and written with Claude Code (AI); the numbers are from the logs of the runs above.

**@⁠JFIREonFIRE** on GitHub · 2026-11-26 20:34 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/333) An NVIDIA data point for the board, and a measurement that explains why 32 GB PCs hit the commit limit (#297, #298). **Machine:** i9-9900K, **32 GB RAM** (system-managed page file, 3 GB allocated, commit limit 34.8 GB), **RTX 3090 24 GB** (driver 32.0.16.2101, ReBAR on), Windows 11. ## 1. `a-publier` at `cd8dfc0` on the RTX 3090 Built with `cargo build --locked --profile diag -p victory --features diagnostics`, settings of `scripts/play.ps1` (not `-Safe`) plus `VICTORY_PANEL=1`, Series S profile, shaders put in the store with `victory shaders` and `warm --used` after a pipeline-book run. 4-minute runs in the prison, Lucia walking (frame line of the log, samples with ≥ 2,000 draws a frame): | run | settings beyond play.ps1 | mean | median | real RAM (2nd half) | VRAM | |---|---|---|---|---|---| | first warm run | – | 545 ms | 573 ms | 23.0 GB | 10.0 GB | | second warm run | – | 532 ms | 366 ms | 22.9 GB | 10.2 GB | | | `VICTORY_FALLBACK_HEAPS=1` | 370 ms | 330 ms | 22.7 GB | 10.7 GB | | | fallback heaps + `PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1` | 515 ms | 402 ms | 22.6 GB | 9.8 GB | The picture is right (lit prison, no black frames), but recording is the cost: about 40,000 list calls a frame take ~2,000 ms of all recording threads together, where the same scene on a codec-d/cool_fox-based tree takes ~1,000 ms. With the five renderer ports on it got slower on this card (copy back 136 ms a frame). For comparison, the cool_fox-based tree on this PC: **121 ms mean, 92 ms median over 11 minutes**. ## 2. Renderer port 1 works on NVIDIA `86dc109`, `4b82f6c` and `9c23e8d` apply cleanly to cool_fox `f4b48ad`. On the RTX 3090 the 185 MB stretch is opened in place (`OpenExistingHeapFromAddress1` works on this driver): `1 regions ... in place (185 MB)`, nothing refused. The copy of that buffer, which was the largest one there (`copied from 0x40a90000+0xae00000: 7.6x/frame, 1395 MB/frame, 5.4-8.4 ms/frame`), is gone. No black frames, no device removal. ## 3. Why 32 GB PCs hit the commit limit: the card's memory counts against it one for one Across six runs of the cool_fox-based tree that reached the world (about 380 of the log's memory lines), a least-squares fit of the process's private bytes against the log's own counters: | fit | VRAM in use | card data in the PC's memory | R² | |---|---|---|---| | private bytes | **1.02–1.11** per MB | 0.93–1.13 per MB | 0.9997–1.000 | | working set | **0.09–0.32** per MB | 1.4–1.8 per MB | 0.95–0.99 | So of "38–42 GB private" about 20 GB is the commit charge of the card's own memory, which is not resident in RAM: the working set peaked at 21–25 GB. The texture cache that keeps textures for 10 minutes while the card is under 88% (`vram_keep`) therefore fills commit as well as VRAM. With a system-managed page file, the commit headroom stays pinned near the residency module's line whatever is cut: with `VICTORY_TEXTURE_KEEP=0` the card held 6 GB less and private bytes fell 5.3 GB, but the headroom rose only 0.4 GB (the page file just grew less). `next_pressure` turns on at ≤ 4 GiB of commit and off only at ≥ 6 GiB *and* ≥ 5 GiB of free RAM, so on this PC it turned on once in every run (with 12 GB of physical memory still free) and never off. Frames while the headroom was under 1.5 GB: | run | headroom < 1.5 GB | headroom ≥ 1.5 GB | |---|---|---| | A | 414 ms | 108 ms | | B | 449 ms | 184 ms | | C | 716 ms | 422 ms | What helped here, as a local switch (not proposed as is): judging pressure by free physical memory alone, with the emergency commit floor at 256 MiB instead of 1.5 GiB. Together with `VICTORY_WINDOWS_BAR_MB=4096` and port 1, over 11 minutes against the same build without them: mean 138 → 121 ms, p90 211 → 189 ms, worst 5 s sample 1,250 → 900 ms, working set (2nd half) 20.2 → 18.3 GB, peak 24.5 → 22.7 GB. `VICTORY_WINDOWS_BAR_MB` alone moved ~2.3 GB of windows from the PC's memory to the card's, without the black flicker it showed together with another local change. A possible direction for #297: on 32 GB PCs the commit limit, not the RAM, is what runs out first, and most of the commit is the card's. Measured and written with Claude Code (AI); the numbers are from the logs of the runs above.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:38:38 +00:00
Author
Owner

@⁠JFIREonFIRE on GitHub · 2026-11-26 21:25 UTC · original

Follow-up on the same RTX 3090 / 32 GB PC, cool_fox-based tree with port 1:

Texture staging in resizable-BAR memory. A local switch puts the 64 MiB staging blocks of pool.rs in D3D12_HEAP_TYPE_GPU_UPLOAD (via mapped_card_buffer) while the card is under 85% of its budget, else the PC's memory as before. With port 1, VICTORY_WINDOWS_BAR_MB=4096 and physical-only pressure (lines 1.5 / 2.5 GiB):

run length mean median working set avg / peak card data in the PC's memory
without staging in BAR 11 min 121 ms 92 ms 18.3 / 22.7 GB 4.6 GB
with staging in BAR 8 min 118 ms 87 ms 17.5 / 19.2 GB 3.7 GB
same build before any of these (cool_fox as shipped) 11 min 138 ms 87 ms 20.2 / 24.5 GB 6.2 GB

Texture staging in the PC's memory fell to 512 MB. One 11-minute run with it ended in a device removal ~100 s into the world (nvlddmkm event 153, no breadcrumbs); the repeat with VICTORY_D3D12_DRED=light ran 8 minutes clean, so it is not settled whether that was the switch.

Where the working set goes (the log's own memory map, 8-minute run, in memory / committed): files and other mappings 4.2 / 6.6 GB (mostly the driver's shader cache and the pipeline library, clean pages); other private allocations ≥ 1 MB 4.9 / 5.1 GB, of them four 1 GiB allocations at host addresses, 2.9 GB committed, in every run including cool_fox as shipped (not found in our code; possibly the title's own host allocations); write-combined memory shared with the card 3.6 / 20.6 GB (the committed side is the VRAM charge from #333); views of the title's pages 3.4 / 5.1 GB; the title's heaps 1.9 / 3.1 GB; windows 1.8 GB; process heap 1.4 GB. The title itself reports used_mb=6134 of limit_mb=7776 (Series S).

DirectStorage over 4 minutes: 14.3 GB read, of it 0.57 GB (4%) BCPack, so most of the title's textures do not arrive as BCPack and cannot be told apart by that.

Measured and written with Claude Code (AI).

**@⁠JFIREonFIRE** on GitHub · 2026-11-26 21:25 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/333#issuecomment-7203710172) Follow-up on the same RTX 3090 / 32 GB PC, cool_fox-based tree with port 1: **Texture staging in resizable-BAR memory.** A local switch puts the 64 MiB staging blocks of `pool.rs` in `D3D12_HEAP_TYPE_GPU_UPLOAD` (via `mapped_card_buffer`) while the card is under 85% of its budget, else the PC's memory as before. With port 1, `VICTORY_WINDOWS_BAR_MB=4096` and physical-only pressure (lines 1.5 / 2.5 GiB): | run | length | mean | median | working set avg / peak | card data in the PC's memory | |---|---|---|---|---|---| | without staging in BAR | 11 min | 121 ms | 92 ms | 18.3 / 22.7 GB | 4.6 GB | | with staging in BAR | 8 min | 118 ms | 87 ms | 17.5 / 19.2 GB | 3.7 GB | | same build before any of these (cool_fox as shipped) | 11 min | 138 ms | 87 ms | 20.2 / 24.5 GB | 6.2 GB | Texture staging in the PC's memory fell to 512 MB. One 11-minute run with it ended in a device removal ~100 s into the world (nvlddmkm event 153, no breadcrumbs); the repeat with `VICTORY_D3D12_DRED=light` ran 8 minutes clean, so it is not settled whether that was the switch. **Where the working set goes** (the log's own memory map, 8-minute run, in memory / committed): files and other mappings 4.2 / 6.6 GB (mostly the driver's shader cache and the pipeline library, clean pages); other private allocations ≥ 1 MB 4.9 / 5.1 GB, of them **four 1 GiB allocations at host addresses, 2.9 GB committed, in every run including cool_fox as shipped** (not found in our code; possibly the title's own host allocations); write-combined memory shared with the card 3.6 / 20.6 GB (the committed side is the VRAM charge from #333); views of the title's pages 3.4 / 5.1 GB; the title's heaps 1.9 / 3.1 GB; windows 1.8 GB; process heap 1.4 GB. The title itself reports `used_mb=6134` of `limit_mb=7776` (Series S). DirectStorage over 4 minutes: 14.3 GB read, of it 0.57 GB (4%) BCPack, so most of the title's textures do not arrive as BCPack and cannot be told apart by that. Measured and written with Claude Code (AI).
Author
Owner

@⁠Adika713 on GitHub · 2026-11-26 21:54 UTC · original

Data point from RX 6950 XT 16GB / R5 3600 / 32GB / 2688MB pagefile unchanged (Belobug b82a5db8, PR #297 lazy/file-backed physical pages WIP, not port1/cool_fox): commit headroom was the tight constraint in longer runs. Low-pressure 720p/budget32/tex64/FILE-only survived 300s timeout_killed with final commit headroom ~0.25GB; higher-pressure runs hit 0x8007000E, dstorage os error 1450, or alloc failures. I haven’t measured VRAM-vs-private-byte R² on this setup, but your finding that card memory counts against commit 1:1 matches the pressure pattern we see. No pagefile changes made.

AI-assisted: OpenCode / opencode/big-pickle.

**@⁠Adika713** on GitHub · 2026-11-26 21:54 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/333#issuecomment-7204169082) Data point from RX 6950 XT 16GB / R5 3600 / 32GB / 2688MB pagefile unchanged (Belobug `b82a5db8`, PR #297 lazy/file-backed physical pages WIP, not port1/cool_fox): commit headroom was the tight constraint in longer runs. Low-pressure 720p/budget32/tex64/FILE-only survived 300s timeout_killed with final commit headroom ~0.25GB; higher-pressure runs hit `0x8007000E`, dstorage os error 1450, or alloc failures. I haven’t measured VRAM-vs-private-byte R² on this setup, but your finding that card memory counts against commit 1:1 matches the pressure pattern we see. No pagefile changes made. AI-assisted: OpenCode / opencode/big-pickle.
Author
Owner

@⁠JFIREonFIRE on GitHub · 2026-11-26 23:09 UTC · original

Follow-up on the commit side: with the texture cache's "keep for minutes" line made adjustable in vram_keep (88 % by default; trimmed back to p−3 % above it), 75 % on the RTX 3090 / 32 GB, 4-minute runs, everything else as in the last comment plus VICTORY_WAIT_RESIDENT=textures (#346):

keep line mean median private bytes (2nd half) working set avg / peak VRAM re-made after letting go
88 % (default) 134 ms 97 ms 31.3 GB 15.9 / 16.8 GB 20.0 GB –
75 % 128 ms 84 ms 29.3 GB 15.7 / 17.1 GB 18.3 GB 1.6 GB in 4 min
65 % 124 ms 91 ms 29.8 GB 16.0 / 17.3 GB 18.5 GB 2.6 GB in 4 min

So about 2 GB of commit comes back at no frame-time cost; below 75 % the card does not get emptier (what remains is in use). A finer window grid (VICTORY_WINDOW_KB=256 + VICTORY_WINDOW_TAILS=1) cut windows from 2.94 to 2.07 GB but made 4,377 of them instead of 710 and the frame several times slower here.

Measured and written with Claude Code (AI).

**@⁠JFIREonFIRE** on GitHub · 2026-11-26 23:09 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/333#issuecomment-7205309683) Follow-up on the commit side: with the texture cache's "keep for minutes" line made adjustable in `vram_keep` (88 % by default; trimmed back to p−3 % above it), 75 % on the RTX 3090 / 32 GB, 4-minute runs, everything else as in the last comment plus `VICTORY_WAIT_RESIDENT=textures` (#346): | keep line | mean | median | private bytes (2nd half) | working set avg / peak | VRAM | re-made after letting go | |---|---|---|---|---|---|---| | 88 % (default) | 134 ms | 97 ms | 31.3 GB | 15.9 / 16.8 GB | 20.0 GB | – | | 75 % | 128 ms | 84 ms | 29.3 GB | 15.7 / 17.1 GB | 18.3 GB | 1.6 GB in 4 min | | 65 % | 124 ms | 91 ms | 29.8 GB | 16.0 / 17.3 GB | 18.5 GB | 2.6 GB in 4 min | So about 2 GB of commit comes back at no frame-time cost; below 75 % the card does not get emptier (what remains is in use). A finer window grid (`VICTORY_WINDOW_KB=256` + `VICTORY_WINDOW_TAILS=1`) cut windows from 2.94 to 2.07 GB but made 4,377 of them instead of 710 and the frame several times slower here. Measured and written with Claude Code (AI).
Author
Owner

@⁠JFIREonFIRE on GitHub · 2026-11-26 23:25 UTC · original

@⁠Adika713 thanks, that matches. On your setup the two things that moved commit most here are both about the card's share, so they should stack with #297's title-side work:

  • vram_keep in host.rs keeps textures for 10 minutes while the card is under 88 % of its budget, so every MB of that cache is also commit. At 75 % the card held ~1.7 GB less, private bytes fell ~2 GB, re-made textures cost 1.6 GB of uploads in 4 minutes, no frame-time change (table above). On a 16 GB card the same 13 % is ~2 GB.
  • Buffers made with CREATE_NOT_RESIDENT + MakeResident + the mapped() wait (VICTORY_WAIT_RESIDENT, on by default): leaving that to textures only (as described in #346) cut ~1.5 GB of working set here, waits 120,000 → 1,000 per 4 min.

I'll put these (plus texture staging in resizable-BAR memory and a physical-RAM-only pressure mode for residency.rs) on a branch against a-publier, each behind its own switch and off by default, and link it here, so they can be tried without reimplementing from text.

Measured and written with Claude Code (AI).

**@⁠JFIREonFIRE** on GitHub · 2026-11-26 23:25 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/333#issuecomment-7205527218) @⁠Adika713 thanks, that matches. On your setup the two things that moved commit most here are both about the card's share, so they should stack with #297's title-side work: - `vram_keep` in `host.rs` keeps textures for 10 minutes while the card is under 88 % of its budget, so every MB of that cache is also commit. At 75 % the card held ~1.7 GB less, private bytes fell ~2 GB, re-made textures cost 1.6 GB of uploads in 4 minutes, no frame-time change (table above). On a 16 GB card the same 13 % is ~2 GB. - Buffers made with `CREATE_NOT_RESIDENT` + `MakeResident` + the `mapped()` wait (`VICTORY_WAIT_RESIDENT`, on by default): leaving that to textures only (as described in #346) cut ~1.5 GB of working set here, waits 120,000 → 1,000 per 4 min. I'll put these (plus texture staging in resizable-BAR memory and a physical-RAM-only pressure mode for `residency.rs`) on a branch against `a-publier`, each behind its own switch and off by default, and link it here, so they can be tried without reimplementing from text. Measured and written with Claude Code (AI).
Author
Owner

@⁠JFIREonFIRE on GitHub · 2026-11-26 23:40 UTC · original

The switches from this thread are now code, each off by default: #394 (VICTORY_WAIT_RESIDENT=textures, VICTORY_TEXTURE_KEEP_PERCENT, VICTORY_STAGING_BAR, VICTORY_PRESSURE_PHYSICAL, VICTORY_WINDOWS_BAR_PERCENT), with tests; clippy both configs clean, victory-gpu tests 401 passed.

AI-assisted (Claude Code).

**@⁠JFIREonFIRE** on GitHub · 2026-11-26 23:40 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/333#issuecomment-7205746253) The switches from this thread are now code, each off by default: #394 (`VICTORY_WAIT_RESIDENT=textures`, `VICTORY_TEXTURE_KEEP_PERCENT`, `VICTORY_STAGING_BAR`, `VICTORY_PRESSURE_PHYSICAL`, `VICTORY_WINDOWS_BAR_PERCENT`), with tests; clippy both configs clean, victory-gpu tests 401 passed. AI-assisted (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
No description provided.