Skip to content

Test card-copy allocation pressure on an 8 GB GPU - #994

Open
suren1013 wants to merge 1 commit into
trustno1-coder:mainfrom
suren1013:codex/low-vram-buffer-pressure-test
Open

suren1013 wants to merge 1 commit into
trustno1-coder:mainfrom
suren1013:codex/low-vram-buffer-pressure-test

Conversation

@suren1013

Copy link
Copy Markdown

Adds a synthetic regression using the RTX 4060 DXGI budget reported in #946. It shows how a 64 KiB minimum can exhaust the card-copy allowance before a large buffer arrives and checks that rejected requests roll back their reservations. The budget-derived minimum admits the large request. Related to #890.

The regression passed in an isolated Rust harness. The Windows-target test code compiled, and the staged asset policy check passed. Runtime measurements are pending.

@psttt432454

Copy link
Copy Markdown
Contributor

A runtime data point, since this builds on #890: I closed #890 after measuring it against main.

RTX 5070 Laptop 8 GB (DXGI budget ~7.1 GB), victory play --series-s, same save and spot, shader cache warm in both runs:

main 63b902fe (MIN_KB=64) #890 (floor 16 MiB)
World frame, median ~45 ms ~180 ms
Kept for card copies of title buffers 118 MB 658 MB
0x8007000E / crash none none

On this card the 64 KiB minimum didn't run out of card-copy room in a real session, and the picture was correct. The budget-derived floor made frames about 4x slower, and CuteBooty saw 2.4-2.7x on an RTX 3070 (details in #890). So I wouldn't take the synthetic case as a reason to bring the floor back without an in-game run. #945 goes after the small buffers' cost without moving them off the card.

@Exopus-0x65f7ad0

Copy link
Copy Markdown

Ran the new regression natively on Windows (the PR mentions an isolated harness): RTX 5060 Ti 8 GB (Blackwell, 10de:2d04), Windows 11 26300, native D3D12. cargo test --release --locked -p victory-gpu --lib small_card_copy_burst_can_displace_a_large_buffer → passed.

A runtime data point from an 8 GB card that fits the scenario: with the launcher defaults (VICTORY_CARD_BUFFERS_MIN_KB=64) this card is at 100 % of its DXGI budget during world load (… 7032 MB against a line of 6325 MB (90.0 % of a budget of 7028 MB): no room). One start in four dies with 0x8007000E on upload/shared buffers (details on #953). So a budget-derived minimum for card copies would be worth measuring in a real session too; I can run a build with it on this machine if you push one.

@psttt432454

Copy link
Copy Markdown
Contributor

@Exopus-0x65f7ad0 No build is needed for that. On main, a minimum of 16384 KiB is what #890 picked on cards under 10 GiB of budget. victory play drops VICTORY_* variables it doesn't keep, so pass it through the launcher:

victory.exe play --set VICTORY_CARD_BUFFERS_MIN_KB=16384

The limits line then reads card_buffers_min_kb=16384. That's how CuteBooty and I measured it in #890. On our cards (RTX 3070 desktop, RTX 5070 Laptop) the floor made world frames 2.4-4x slower, and neither card was over its budget with 64, which is why I closed #890. Yours reaches 100 % of the budget at world load, so it may come out the other way. The start-up failure rate and the in-world frame time would both be worth comparing.

@Exopus-0x65f7ad0

Exopus-0x65f7ad0 commented Nov 28, 2026 •

Copy link
Copy Markdown

@psttt432454 Thanks, done. Same machine (RTX 5060 Ti 8 GB, vram_budget_mb=7124, 16 GB RAM), same build both ways (63b902f + #901 + local commits), README launcher defaults with only VICTORY_CARD_BUFFERS_MIN_KB changed through the launcher. The limits line read card_buffers_min_kb=16384 card_buffers_max_mb=1282 in the 16384 runs. World frames are the 5-s frame lines with ≥ 4,000 draws (prison room, cutscene and walk).

min 64 KiB (launcher default) min 16384 KiB
starts 4 (same build) 3
reached the world 4 / 4 3 / 3
0x8007000E refusals 0 0
#846 stalls at world load 2 / 4 0 / 3
world fps, median (per run) 16.8 · 15.5 4.1 · 4.2 · 4.5
ms/frame, median 58.9 · 64.6 245 · 240 · 222
"copying back", median 13.0 · 12.8 ms 80.0 · 86.8 · 86.5 ms
at the end: kept for card copies of title buffers — 553 MB

So on this card, the 16 MiB floor makes world frames ~3.7× slower, almost all of it in copying back (+70 ms) and preparing. That's the same direction as on your 3070 and 5070 Laptop, even though this card is at 100 % of its budget with 64. So the floor isn't a fix for the 8 GB case either, and closing #890 looks right from here too.

One thing I didn't expect, with too few runs to claim anything: none of the three 16384 starts hit the #846 stall, against 2 of 4 with 64 on the same build. With 64, my overall count today is about 1 stall in 3 starts. If the stall is tied to how many small card copies are live at world load, that could be a lead. I'll note it on #846 as a maybe.

Edit: the stalls I mention here turned out to come from a local, unpublished commit in my own build (a dispatch that waits for its compute pipeline with no time limit). With it off, 0 stalls in 5 starts. They are not the upstream #846 stall; see my correction on #846.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants