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
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/Belobug--VIctory-Belobug-AMD#333
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@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-publieratcd8dfc0on the RTX 3090Built with
cargo build --locked --profile diag -p victory --features diagnostics, settings ofscripts/play.ps1(not-Safe) plusVICTORY_PANEL=1, Series S profile, shaders put in the store withvictory shadersandwarm --usedafter a pipeline-book run. 4-minute runs in the prison, Lucia walking (frame line of the log, samples with ≥ 2,000 draws a frame):VICTORY_FALLBACK_HEAPS=1PORT_CONSTANTS/DESCRIPTORS/CBV/GUARD/JOURNAL=1The 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,4b82f6cand9c23e8dapply cleanly to cool_foxf4b48ad. On the RTX 3090 the 185 MB stretch is opened in place (OpenExistingHeapFromAddress1works 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:
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=0the 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_pressureturns 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: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=4096and 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_MBalone 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 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.rsinD3D12_HEAP_TYPE_GPU_UPLOAD(viamapped_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=4096and physical-only pressure (lines 1.5 / 2.5 GiB):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=lightran 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=6134oflimit_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).
@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 hit0x8007000E, 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.
@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 plusVICTORY_WAIT_RESIDENT=textures(#346):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: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_keepinhost.rskeeps 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.CREATE_NOT_RESIDENT+MakeResident+ themapped()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 againsta-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: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).