Newer retail game on a 32 GB machine: 31 default DXC threads and ~18 GB commit run Windows out of memory #542

Open
opened 2026-11-26 04:25:08 +00:00 by github-bot · 4 comments
Owner

@⁠woreksami on GitHub · 2026-11-24 01:35 UTC · original

Game and package version

A newer retail game

What happens

On a 32 GB machine the run nearly took Windows down from memory, twice, and with fewer compile threads it still ends at 1.6–3 GB free within 3–6 minutes.

  • Compile threads. compile_threads() defaults to every core but one: 31 on an i9-14900K (32 threads). dxc.rs says a big translation of this title takes ~0.7 GB in DXC. With the default, the first runs made the whole machine unresponsive during the first big compile wave (seen, not measured: the system was too slow to read counters).
  • With XCL_DXC_THREADS=4 (all runs below, XCL_NETWORK=0, everything else closed but the browser): free physical memory from 12–20 GB at launch to 1.6–3.0 GB after 3–6.5 minutes, while the title is on its loading screen. An external watcher stopped each run there.
  • At that point the log shows coherent 3998/4095 MB, sparse 7445 MB and a texture … lies in a GPU view of the title's CPU memory: kept in step … (16384 so far).
  • A smaller title budget did not help: title_memory_mb = 11264 (instead of the 13,824 default) reached 1.6 GB free after ~3 minutes, sooner than without it.
  • device_type = "lockhart" is not a way round it either: in that mode the title creates a 1920×1080 R9G9B9E5_SHAREDEXP render target + UAV, which the PC refuses (E_INVALIDARG) and the title stops at ~17 s.

Proposal: cap the default compile threads by memory as well as cores, e.g. min(cores - 1, free physical GB / 1), so a 32-thread CPU with 32 GB does not start 31 DXC compiles of up to 0.7 GB at once. Happy to test a PR.

XCL version

main 508a0c7 + #214, #267, #300, #503, #468 (head commits 960162e, 043d1f7, 9507d05, 78f5510, 0d407cf)

GPU and driver version

NVIDIA GeForce RTX 3060 8 GB, driver 610.88 · Intel i9-14900K · 32 GB RAM

Windows version

Windows 11 (26200)

report.json and xcl.log

Not attached: they hold my file paths. I can paste any part.

AI use: Claude Code with Claude Opus 5.5 ran these tests, read the logs and wrote this issue from my runs.

**@⁠woreksami** on GitHub · 2026-11-24 01:35 UTC · [original](https://github.com/xcl-dev/xcl/issues/542) ### Game and package version A newer retail game ### What happens On a 32 GB machine the run nearly took Windows down from memory, twice, and with fewer compile threads it still ends at 1.6–3 GB free within 3–6 minutes. - **Compile threads.** `compile_threads()` defaults to every core but one: 31 on an i9-14900K (32 threads). `dxc.rs` says a big translation of this title takes ~0.7 GB in DXC. With the default, the first runs made the whole machine unresponsive during the first big compile wave (seen, not measured: the system was too slow to read counters). - **With `XCL_DXC_THREADS=4`** (all runs below, `XCL_NETWORK=0`, everything else closed but the browser): free physical memory from 12–20 GB at launch to **1.6–3.0 GB** after 3–6.5 minutes, while the title is on its loading screen. An external watcher stopped each run there. - At that point the log shows `coherent 3998/4095 MB, sparse 7445 MB` and `a texture … lies in a GPU view of the title's CPU memory: kept in step … (16384 so far)`. - **A smaller title budget did not help:** `title_memory_mb = 11264` (instead of the 13,824 default) reached 1.6 GB free after ~3 minutes, sooner than without it. - `device_type = "lockhart"` is not a way round it either: in that mode the title creates a 1920×1080 `R9G9B9E5_SHAREDEXP` render target + UAV, which the PC refuses (E_INVALIDARG) and the title stops at ~17 s. **Proposal:** cap the default compile threads by memory as well as cores, e.g. `min(cores - 1, free physical GB / 1)`, so a 32-thread CPU with 32 GB does not start 31 DXC compiles of up to 0.7 GB at once. Happy to test a PR. ### XCL version `main` 508a0c7 + #214, #267, #300, #503, #468 (head commits 960162e, 043d1f7, 9507d05, 78f5510, 0d407cf) ### GPU and driver version NVIDIA GeForce RTX 3060 8 GB, driver 610.88 · Intel i9-14900K · 32 GB RAM ### Windows version Windows 11 (26200) ### report.json and xcl.log Not attached: they hold my file paths. I can paste any part. AI use: Claude Code with Claude Opus 5.5 ran these tests, read the logs and wrote this issue from my runs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:25:08 +00:00
Author
Owner

@⁠WebIdentity1 on GitHub · 2026-11-24 01:52 UTC · original · edited 2026-11-24 01:57 UTC

I’m working on a small default-worker cap for this report: keep one CPU thread free, then limit DXC/feeding PSO workers to roughly 1 GiB each from the smaller of available physical memory and available commit, after the existing title/precompile reserve. Explicit XCL_DXC_THREADS keeps its existing override behavior.

This is separate from #139's dynamic admission/race fixes and #214's driver-PSO gate; it does not replace either or promise to contain runaway allocations. I’ll check synthetic boundary cases and native Windows compilation on a 32 GB / RTX 3090 machine. No retail files here, so any draft will still need a retail regression run; this is a default-concurrency mitigation, not a demonstrated fix for the later world-loading memory growth.

AI assistance: Codex (GPT-6). Work tracked at https://github.com/WebIdentity1/xcl/issues/1.

Update: draft #572, head 14d638a, is available. Policy tests pass 3/3; the old-decision control fails 2/3. Native Windows full workspace: 682 passed / 1 existing CLAMP failure / 41 ignored, with four explicit skips disclosed. Our idle 8-thread/32 GB setup stays CPU-limited at 7 workers; no retail-memory improvement is claimed.

If you can test this on the machine from this report, paired main/head scripts/smoke.ps1 runs and the worker count / memory behavior would help assess the mitigation. Leave XCL_DXC_THREADS unset when checking the new default. The draft still needs retail regression evidence.

**@⁠WebIdentity1** on GitHub · 2026-11-24 01:52 UTC · [original](https://github.com/xcl-dev/xcl/issues/542#issuecomment-7119521717) · edited 2026-11-24 01:57 UTC I’m working on a small default-worker cap for this report: keep one CPU thread free, then limit DXC/feeding PSO workers to roughly 1 GiB each from the smaller of available physical memory and available commit, after the existing title/precompile reserve. Explicit `XCL_DXC_THREADS` keeps its existing override behavior. This is separate from #139's dynamic admission/race fixes and #214's driver-PSO gate; it does not replace either or promise to contain runaway allocations. I’ll check synthetic boundary cases and native Windows compilation on a 32 GB / RTX 3090 machine. No retail files here, so any draft will still need a retail regression run; this is a default-concurrency mitigation, not a demonstrated fix for the later world-loading memory growth. AI assistance: Codex (GPT-6). Work tracked at https://github.com/WebIdentity1/xcl/issues/1. Update: [draft #572](https://github.com/ivall/xcl/pull/572), head `14d638a`, is available. Policy tests pass 3/3; the old-decision control fails 2/3. Native Windows full workspace: 682 passed / 1 existing CLAMP failure / 41 ignored, with four explicit skips disclosed. Our idle 8-thread/32 GB setup stays CPU-limited at 7 workers; no retail-memory improvement is claimed. If you can test this on the machine from this report, paired main/head `scripts/smoke.ps1` runs and the worker count / memory behavior would help assess the mitigation. Leave `XCL_DXC_THREADS` unset when checking the new default. The draft still needs retail regression evidence.
Author
Owner

@⁠MonkeyPython on GitHub · 2026-11-24 02:13 UTC · original · edited 2026-11-24 02:47 UTC

@⁠odd/tasks/draft-issue-542-comment.md

**@⁠MonkeyPython** on GitHub · 2026-11-24 02:13 UTC · [original](https://github.com/xcl-dev/xcl/issues/542#issuecomment-7119893937) · edited 2026-11-24 02:47 UTC @⁠odd/tasks/draft-issue-542-comment.md
Author
Owner

@⁠MonkeyPython on GitHub · 2026-11-24 03:36 UTC · original

@⁠WebIdentity1 re the worker-cap fix in flight: the measured curves on this host (32 GB, 8C/16T → 15 default threads) suggest a per-worker cap alone would not prevent the exhaustion on this title — the loading growth is thread-count-independent:

  • 15 threads: commit 14.8 → 39.48 GB, free RAM → 0.09 GB, null write @⁠266 s.
  • XCL_DXC_THREADS=4: commit 14.7 → 39.89 GB, free RAM → 0.21 GB, null write @⁠277 s (repeat @⁠266 s).

Essentially identical ~25 GB growth with 4 vs 15 compiles. What did move it: #602 (in-place detile/hash) + #451 (upload-buffer reuse) + #435 (smaller swizzle tables) cut the peak to 28.3 GB (n=3: 27.6 / 28.3 / 28.5) with free RAM ≥ 2.8 GB — i.e. the growth lived in the upload/detile copies, not in DXC worker intermediates. Full curves and method in the edited report above; a cap sized from available memory is still a good safety net for titles where compiles dominate (this issue's i9 case), but on GTA VI 1.0.2.1 the copy-side PRs are what relieved the pressure.

AI use: Gentle Shell (Pi coding agent), model qwen4-max: measurements from the runs logged in the report above; a human reviews this reply before posting.

**@⁠MonkeyPython** on GitHub · 2026-11-24 03:36 UTC · [original](https://github.com/xcl-dev/xcl/issues/542#issuecomment-7121248709) @⁠WebIdentity1 re the worker-cap fix in flight: the measured curves on this host (32 GB, 8C/16T → 15 default threads) suggest a per-worker cap alone would not prevent the exhaustion on this title — the loading growth is thread-count-independent: - 15 threads: commit 14.8 → **39.48 GB**, free RAM → **0.09 GB**, null write @⁠266 s. - `XCL_DXC_THREADS=4`: commit 14.7 → **39.89 GB**, free RAM → **0.21 GB**, null write @⁠277 s (repeat @⁠266 s). Essentially identical ~25 GB growth with 4 vs 15 compiles. What *did* move it: #602 (in-place detile/hash) + #451 (upload-buffer reuse) + #435 (smaller swizzle tables) cut the peak to **28.3 GB** (n=3: 27.6 / 28.3 / 28.5) with free RAM ≥ 2.8 GB — i.e. the growth lived in the upload/detile copies, not in DXC worker intermediates. Full curves and method in the edited report above; a cap sized from available memory is still a good safety net for titles where compiles dominate (this issue's i9 case), but on GTA VI 1.0.2.1 the copy-side PRs are what relieved the pressure. **AI use:** Gentle Shell (Pi coding agent), model qwen4-max: measurements from the runs logged in the report above; a human reviews this reply before posting.
Author
Owner

@⁠woreksami on GitHub · 2026-11-24 05:11 UTC · original

Where the commit goes on this machine (RTX 3060 8 GB, 32 GB RAM, 43.2 GB commit limit with a system-managed 11.5 GB pagefile). Short version: XCL's pools are nearly full, so this is not a leak; the run ends because every byte of video memory is also charged to system commit.

Tested

  • main f4ce27c + #214, #267, #456, #468, #503, #572 (merged locally), release, XCL_NETWORK=0, XCL_PSO_WAIT_MS=150, XCL_ACTIVITY=1; the newer retail title from the README, 1.0.2.1.
  • XCL_ACTIVITY at 38 s: 16310 MB committed by the process; video memory 7297 MB local, 4874 MB non-local; target pages 4554 MB (pools 4608 MB); arenas 465 MB in use, 465 MB made; sparse pools 1024 MB (987 MB mapped). Pools are 99 % / 96 % used.
  • A walk of the process's committed regions at ~22 s (VirtualQueryEx + QueryWorkingSetEx), private memory: 14.54 GB committed, 7.85 GB resident, 6.69 GB never touched. Grouped:
    • 77 regions of 64 MB, PAGE_READWRITE | PAGE_WRITECOMBINE: 4.81 GB committed, 0.31 GB resident
    • 29 regions of 32 MB, same protection: 0.91 GB committed, 0.34 GB resident
    • 1 region of 4096 MB (the coherent window): 4.00 GB, all resident
    • 69 regions of 16 MB: 1.07 GB, all resident
  • The 64 MB / 32 MB write-combined regions add up to about the local heaps XCL made (target-page pools + sparse pools + arenas, 64 MB heaps). On this driver (610.88) each D3D12_HEAP_TYPE_DEFAULT heap shows up as an equal, untouched, write-combined private region: commit charged for video memory, never resident.
  • Result: free commit 2.4–2.6 GB within 36–80 s in three runs while 7.9–9.6 GB of physical memory was still free; the pagefile did not grow (still 11.5 GB). An external watcher of mine stopped the runs there.

So

  • Reducing compile workers (#572) helps the first compile wave but cannot fix this; neither does trimming pools (they are full).
  • What would: fewer bytes of video memory per byte of title data, or a startup check that tells the user the commit limit is too low for this title (on 32 GB the default pagefile is not enough here).
  • device_type = "lockhart" does not reduce it: 15.0 GB committed at 14 s vs 14.5 GB as anaconda (with #541 + #743 the mesh-pipeline refusals are gone, but the title still stops at ~15 s with 0x80000003 at the same address in that mode).

Not tested

  • Another NVIDIA driver, AMD, a fixed larger pagefile.

AI use

  • Claude Code with Claude Opus 5.5: ran the title, wrote the memory-walk tool, read the logs and counters and wrote this comment from those runs.
**@⁠woreksami** on GitHub · 2026-11-24 05:11 UTC · [original](https://github.com/xcl-dev/xcl/issues/542#issuecomment-7122703039) Where the commit goes on this machine (RTX 3060 8 GB, 32 GB RAM, 43.2 GB commit limit with a system-managed 11.5 GB pagefile). Short version: XCL's pools are nearly full, so this is not a leak; the run ends because every byte of video memory is also charged to system commit. **Tested** - `main` f4ce27c + #214, #267, #456, #468, #503, #572 (merged locally), release, `XCL_NETWORK=0`, `XCL_PSO_WAIT_MS=150`, `XCL_ACTIVITY=1`; the newer retail title from the README, 1.0.2.1. - `XCL_ACTIVITY` at 38 s: `16310 MB committed by the process; video memory 7297 MB local, 4874 MB non-local; target pages 4554 MB (pools 4608 MB); arenas 465 MB in use, 465 MB made; sparse pools 1024 MB (987 MB mapped)`. Pools are 99 % / 96 % used. - A walk of the process's committed regions at ~22 s (VirtualQueryEx + QueryWorkingSetEx), private memory: **14.54 GB committed, 7.85 GB resident, 6.69 GB never touched**. Grouped: - 77 regions of 64 MB, `PAGE_READWRITE | PAGE_WRITECOMBINE`: 4.81 GB committed, 0.31 GB resident - 29 regions of 32 MB, same protection: 0.91 GB committed, 0.34 GB resident - 1 region of 4096 MB (the coherent window): 4.00 GB, all resident - 69 regions of 16 MB: 1.07 GB, all resident - The 64 MB / 32 MB write-combined regions add up to about the local heaps XCL made (target-page pools + sparse pools + arenas, 64 MB heaps). On this driver (610.88) each `D3D12_HEAP_TYPE_DEFAULT` heap shows up as an equal, untouched, write-combined private region: commit charged for video memory, never resident. - Result: free commit 2.4–2.6 GB within 36–80 s in three runs while 7.9–9.6 GB of physical memory was still free; the pagefile did not grow (still 11.5 GB). An external watcher of mine stopped the runs there. **So** - Reducing compile workers (#572) helps the first compile wave but cannot fix this; neither does trimming pools (they are full). - What would: fewer bytes of video memory per byte of title data, or a startup check that tells the user the commit limit is too low for this title (on 32 GB the default pagefile is not enough here). - `device_type = "lockhart"` does not reduce it: 15.0 GB committed at 14 s vs 14.5 GB as `anaconda` (with #541 + #743 the mesh-pipeline refusals are gone, but the title still stops at ~15 s with 0x80000003 at the same address in that mode). **Not tested** - Another NVIDIA driver, AMD, a fixed larger pagefile. **AI use** - Claude Code with Claude Opus 5.5: ran the title, wrote the memory-walk tool, read the logs and counters and wrote this comment from those runs.
This discussion has been locked. Commenting is limited to contributors.
No description provided.