16 GB RAM regression on 923e38c: 8 GiB WDDM L0 Shared GPU Memory exhausted in ~95s (CommandList::Close 0x8007000E) + VICTORY_WINDOWS_BAR_MB auto-config dropped #1520

Closed
opened 2026-11-28 21:13:37 +00:00 by github-bot · 0 comments
Owner

@⁠GreekNinja on GitHub · 2026-11-28 21:11 UTC · original

Summary

On a 16 GB RAM + RTX 3060 12 GB (Resizable BAR enabled) + Ryzen 7 5700X (Windows 11, Series S) PC, 923e38c hits Windows' 8 GiB Shared GPU Memory (L0) hard cap (50% of system RAM) in ~95 seconds of world load/gameplay, failing with a host command list did not close (0x8007000E) even when VRAM is only 6.3 / 11.3 GB and 40 GB of pagefile commit is free.

Root Causes (verified in 923e38c)

  1. VICTORY_WINDOWS_BAR_MB=3072 auto-config was accidentally dropped for < 24 GB PCs:
    • Commit 85a529b added automatic VICTORY_WINDOWS_BAR_MB=3072 on < 24 GB RAM PCs in scripts/play-nvidia.ps1 specifically to prevent the 1-minute 0x8007000E CommandList::Close crash on 16 GB + RTX 3060 rigs.
    • Commit 22c6be2 replaced scripts/play-nvidia.ps1 with a 4-line shim to scripts/play-foxhound.ps1, dropping that < 24 GB check; apps/victory/src/play.rs also never sets it.
  2. Multiple new L0 caches stack past 8 GiB on 16 GB PCs (residency::limited_host_ram() only checks <= 32 GiB, treating 16 GB the same as 32 GB):
    • VICTORY_BUFFER_POOL=1 (pool.rs:30, 104, 392, 1071): 64 MiB L0 heaps (UPLOADS + SHARED) with REST = 2500 ms quarantine; a single 64 KiB cached piece in UPLOAD_SPARE/SPARE/ExactPool pins an entire 64 MiB L0 heap until 100% empty.
    • VICTORY_UPLOAD_POOL_MB=1024 (host.rs:2476): up to 2,048 MiB L0 (1024 MiB × 2 kinds), ignoring limited_host_ram().
    • host::send::SPARE (host/send.rs:120-125): up to 768 MiB L0, ignoring limited_host_ram() and never trimmed in host.rs::sweep() even under pressured() / critical_commit().
    • VICTORY_EXACT_POOL_MB=256 (shadow.rs:6219) and VICTORY_BUFFERS_AHEAD=4096 (ahead.rs:47).

Verified A/B/C Results (same PC, same 923e38c build)

Run Key switches 0x8007000E errors MakeResident waits Peak VRAM Outcome
Baseline Default 923e38c + VICTORY_WAIT_RESIDENT=textures 228,956 16,000 pre-OOM (12.7s) -> 100,000 12,082 / 11,345 MB OOM storm + nvwgf2umx.dll crash (also #1496)
+ #1496 & WB workarounds VICTORY_TEXTURE_FIRST_UPLOAD_MB=0, VICTORY_SCRATCH_WB=0 3 (fatal Close()) 0 6,302 / 11,345 MB Fatal CommandList::Close 0x8007000E at ~95 s
+ 16 GB L0 & ReBAR fix Above + VICTORY_WINDOWS_BAR_MB=3072, VICTORY_BUFFER_POOL=0, VICTORY_UPLOAD_POOL_MB=128, VICTORY_EXACT_POOL_MB=64, VICTORY_BUFFERS_AHEAD=512 0 0 8,947–9,210 / 11,330 MB Stable gameplay (9.5–13.6 fps, 8k–10k draws/frame), clean exit

Concrete Fix Proposal

  1. Add a < 24 GiB tier residency::small_host_ram() (crates/victory-gpu/src/residency.rs:93) matching commit 85a529b's threshold.
  2. Auto-scale L0 pools when small_host_ram() is true (all still overridable via env vars):
    • VICTORY_BUFFER_POOL: default 0 on < 24 GiB (prevents 64 MiB L0 slab pinning).
    • VICTORY_UPLOAD_POOL_MB: 128 per kind (vs 1024).
    • VICTORY_EXACT_POOL_MB: 64 (vs 256).
    • host::send::SPARE: 128 MiB (vs 768 MiB) + add send::trim() called from host.rs::sweep() under pressured() / critical_commit().
    • VICTORY_BUFFERS_AHEAD: 512 (vs 4096) and pause refill under pressured().
  3. Restore < 24 GiB auto VICTORY_WINDOWS_BAR_MB in apps/victory/src/play.rs and scripts/play-foxhound.ps1 (or VRAM-budget-aware in shadow.rs:556: 3072 on >=10 GB VRAM budget, 1536 on 8 GB, 0 below 7 GB; window_mapped_for already falls back safely when ReBAR is absent or VRAM > 80%).
  4. Bonus stability/perf fix: in host.rs:2506-2565 (trim_spare_chunks / trim_spare_uploads), keep a tiny hot floor (16–32 MiB) unless residency::critical_commit(), because on 16 GB PCs host memory pressure never clears (needs >=5 GiB free RAM) and currently wipes spares to 0 bytes at 1 Hz.

Note: This report/comment was generated and submitted automatically by an AI assistant analyzing real local play logs and source code on behalf of the user.

**@⁠GreekNinja** on GitHub · 2026-11-28 21:11 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1520) ### Summary On a **16 GB RAM + RTX 3060 12 GB (Resizable BAR enabled) + Ryzen 7 5700X (Windows 11, Series S)** PC, `923e38c` hits Windows' **8 GiB Shared GPU Memory (L0) hard cap** (50% of system RAM) in ~95 seconds of world load/gameplay, failing with `a host command list did not close (0x8007000E)` even when VRAM is only `6.3 / 11.3 GB` and 40 GB of pagefile commit is free. ### Root Causes (verified in `923e38c`) 1. **`VICTORY_WINDOWS_BAR_MB=3072` auto-config was accidentally dropped for `< 24 GB` PCs:** - Commit `85a529b` added automatic `VICTORY_WINDOWS_BAR_MB=3072` on `< 24 GB` RAM PCs in `scripts/play-nvidia.ps1` specifically to prevent the 1-minute `0x8007000E` `CommandList::Close` crash on 16 GB + RTX 3060 rigs. - Commit `22c6be2` replaced `scripts/play-nvidia.ps1` with a 4-line shim to `scripts/play-foxhound.ps1`, dropping that `< 24 GB` check; `apps/victory/src/play.rs` also never sets it. 2. **Multiple new L0 caches stack past 8 GiB on 16 GB PCs** (`residency::limited_host_ram()` only checks `<= 32 GiB`, treating 16 GB the same as 32 GB): - `VICTORY_BUFFER_POOL=1` (`pool.rs:30, 104, 392, 1071`): 64 MiB L0 heaps (`UPLOADS` + `SHARED`) with `REST = 2500 ms` quarantine; a single 64 KiB cached piece in `UPLOAD_SPARE`/`SPARE`/`ExactPool` pins an entire 64 MiB L0 heap until 100% empty. - `VICTORY_UPLOAD_POOL_MB=1024` (`host.rs:2476`): up to **2,048 MiB** L0 (1024 MiB × 2 kinds), ignoring `limited_host_ram()`. - `host::send::SPARE` (`host/send.rs:120-125`): up to **768 MiB** L0, ignoring `limited_host_ram()` and **never trimmed in `host.rs::sweep()`** even under `pressured()` / `critical_commit()`. - `VICTORY_EXACT_POOL_MB=256` (`shadow.rs:6219`) and `VICTORY_BUFFERS_AHEAD=4096` (`ahead.rs:47`). ### Verified A/B/C Results (same PC, same `923e38c` build) | Run | Key switches | `0x8007000E` errors | `MakeResident` waits | Peak VRAM | Outcome | |---|---|---|---|---|---| | Baseline | Default `923e38c` + `VICTORY_WAIT_RESIDENT=textures` | **228,956** | 16,000 pre-OOM (12.7s) -> 100,000 | 12,082 / 11,345 MB | OOM storm + `nvwgf2umx.dll` crash (also #1496) | | + #1496 & WB workarounds | `VICTORY_TEXTURE_FIRST_UPLOAD_MB=0`, `VICTORY_SCRATCH_WB=0` | **3** (fatal `Close()`) | **0** | 6,302 / 11,345 MB | Fatal `CommandList::Close 0x8007000E` at ~95 s | | + 16 GB L0 & ReBAR fix | Above + `VICTORY_WINDOWS_BAR_MB=3072`, `VICTORY_BUFFER_POOL=0`, `VICTORY_UPLOAD_POOL_MB=128`, `VICTORY_EXACT_POOL_MB=64`, `VICTORY_BUFFERS_AHEAD=512` | **0** | **0** | 8,947–9,210 / 11,330 MB | **Stable gameplay (9.5–13.6 fps, 8k–10k draws/frame), clean exit** | ### Concrete Fix Proposal 1. Add a `< 24 GiB` tier `residency::small_host_ram()` (`crates/victory-gpu/src/residency.rs:93`) matching commit `85a529b`'s threshold. 2. Auto-scale L0 pools when `small_host_ram()` is true (all still overridable via env vars): - `VICTORY_BUFFER_POOL`: default `0` on `< 24 GiB` (prevents 64 MiB L0 slab pinning). - `VICTORY_UPLOAD_POOL_MB`: `128` per kind (vs `1024`). - `VICTORY_EXACT_POOL_MB`: `64` (vs `256`). - `host::send::SPARE`: `128 MiB` (vs `768 MiB`) + add `send::trim()` called from `host.rs::sweep()` under `pressured()` / `critical_commit()`. - `VICTORY_BUFFERS_AHEAD`: `512` (vs `4096`) and pause refill under `pressured()`. 3. Restore `< 24 GiB` auto `VICTORY_WINDOWS_BAR_MB` in `apps/victory/src/play.rs` and `scripts/play-foxhound.ps1` (or VRAM-budget-aware in `shadow.rs:556`: `3072` on >=10 GB VRAM budget, `1536` on 8 GB, `0` below 7 GB; `window_mapped_for` already falls back safely when ReBAR is absent or VRAM > 80%). 4. Bonus stability/perf fix: in `host.rs:2506-2565` (`trim_spare_chunks` / `trim_spare_uploads`), keep a tiny hot floor (`16–32 MiB`) unless `residency::critical_commit()`, because on 16 GB PCs `host memory pressure` never clears (needs >=5 GiB free RAM) and currently wipes spares to 0 bytes at 1 Hz. --- *Note: This report/comment was generated and submitted automatically by an AI assistant analyzing real local play logs and source code on behalf of the user.*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 21:13:38 +00:00
github-bot referenced this issue from a commit 2026-11-29 08:20:38 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA#1520
No description provided.