Retail Game potentially overcomitting VRAM - feasibility for 8GB VRAM cards? #320
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#320
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?
@jvyden on GitHub · 2026-11-23 23:17 UTC · original
Game and package version
The retail title - 1.0.2.1
What happens
I've noticed that the game commits quite a high amount of VRAM - 6.4GB on a 8GB card. This results in a lot of CPU traffic, almost 1GiB/s TX according to
nvtop:VIctory, another emulator with the same goal, consumes significantly less VRAM, only about 4.7gb on the same game:
Is there hope for this game on Turing cards or cards with low VRAM, especially considering the Xbox Series X only has ~10gb of RAM total? What causes the allocation difference?
XCL version
4017f8ff8fwith #128 and #283 appliedGPU and driver version
NVIDIA GeForce RTX 2080 Rev. A 615.78.8.0 (2580775424)
Windows version
Arch Linux x86_64
report.json and xcl.log
xcl.log
report.json
xcl.prev.log
report.prev.json
Console output
@ivall on GitHub · 2026-11-23 23:40 UTC · original
Known and being worked on. Two parts: textures kept in step with the title's memory got a PC copy per placement that was never let go (#248) - #288, which backs them with shared video-memory pages, is being merged now and roughly halves the growth while the world streams; and GPU-owned targets already share pages per address since
38b05b7. Some of the rest is XCL's own (the coherent window, sparse pools). Whether 8 GB cards will be enough is not settled yet; a run of current main after #288 lands would be a useful data point.@jvyden on GitHub · 2026-11-23 23:53 UTC · original
Hmm, seems roughly the same on the latest version at the first screen, maybe about a ~100MB VRAM improvement:
I do also have #335 applied though for Linux fixes but after looking at the code that shouldn't cause a difference in VRAM usage.
@3L1A5-1 on GitHub · 2026-11-24 01:46 UTC · original
Follow-up to my comment above: what the growth during world loading is made of. Same machine (RTX 2060 SUPER 8 GB, 617.14; i5-9400F; 16 GB RAM; Windows 11 26300),
main508a0c7plus a local diagnostic patch (not for a PR): everyXCL_ACTIVITYtick it also prints, fromvram::Pages, the targets by state, pages in use vs idle, the most targets on one page, and counters bumped inplace_on_pages(placed),forget_pages(released) andunmap_superseded(superseded). Release build,XCL_NETWORK=0, keyboard through the menus, then the world loads behind the black screen.res_releasereachedvram::forgetfor 11 of them. There are never idle pages: every page is held by a live, mapped target (1-6 targets per page). The mapped ones are mostly small (178,180 tiles over 20,561 targets, ~9 tiles each; the biggest 57 MB).Not measured: who holds the references. The title may keep these objects (a texture streamer that keeps one per resident texture and reuses the memory underneath, which costs nothing on the console), or something holds an extra reference. If it's the former, the pages of a target whose memory the title has since used for something else are never given back. I haven't checked whether the title frees, decommits or reuses those addresses.
Report written with Claude Code (Claude Opus 5.5) from these runs.
@MonkeyPython on GitHub · 2026-11-24 02:33 UTC · original
12 GB data point on current main (the maintainer ask: "a run of current main after #288 lands would be a useful data point"): the title's video-memory shape fits in 12 GB through the loading phase — no
E_OUTOFMEMORYfrom video memory — but system RAM, not VRAM, is the binding constraint on a 32 GB machine.Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB, RTX 3080 Ti 12 GB (driver 621.01), main
508a0c7, release,XCL_NETWORK=0+ firewall, GTA VI Series 1.0.2.1, 3840×2160. Scripted menu walk into loading; 266 s run ended in the #232 null write (not a memory failure).Video memory:
coherent 3998/4095 MB, sparse 7445 MB, 99 blocks held for 98 allocatorsat the end; zero0x8007000e, zero refusedCreateHeap/CreatePlacedResourceX, zerono video memorylines. The sparse 7445 MB alone is ~7.3 GB — it fits in 12 GB with room for the rest, would be tight on 8 GB (this issue's 3070 point: 6453 MB local + 1035 MB non-local), and does not fit in 6 GB (#345).System memory (the actual pressure): xcl private commit 14.8 GB at t=122 s → 39.5 GB at t=274 s; free physical RAM 10.3 → 0.09 GB; window at 0.0 FPS with
5 running, 2 done, 58646 pipelines queuedat t=254 s. The #542 thread-count-vs-memory shape, on 15 DXC threads (8C/16T). A follow-up run withXCL_DXC_THREADS=4is in progress and will be reported in #542.Not tested: 8 GB cards directly, other titles, longer gameplay soaks.
AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the title with scripted input and wrote this report from the logs and memory samples; a human reviews it before posting. No code changes.
@CuteBooty on GitHub · 2026-11-24 01:07 UTC · original · edited 2026-11-24 02:51 UTC
Data point for an 8 GB card on Windows. Edited: three corrections, and runs past the menus added.
Setup: RTX 3070 8 GB (32-lane waves), NVIDIA 617.14 for the first-menu runs and 621.24 for the world-loading runs (driver updated in between); Ryzen 5 3600, 32 GB RAM; Windows 11 Pro 26200; rustc 1.100.0 MSVC; release builds; the same title and package version as this report;
XCL_NETWORK=0and a firewall block.Corrections to the first version
First menu,
main2997c9a,scripts\smoke.ps1 -Seconds 60: run 1 (first run here): 543 frames, peak commit 15351 MB, video memory 6453 MB local / 1035 MB non-local. Run 2: 903 frames, 14535 MB, 6080 / 4619 MB. No device removal, no crash.World loading (A pressed by
XCL_PRESS_ATevery 6 s from 24 to 198 s;XCL_ACTIVITY=1; region sizes fromVirtualQueryEx, GPU figures from Windows' "GPU Process Memory" counters):main508a0c7, 4 runsmain3db536e(adds #435, #451, #300), 2 runs508a0c7run, both3db536eruns)+0x23cf683(#505)508a0c7, from the plateau before loading to the end of the one sampled run, private bytes grew 18.3 GB: 9.3 GB heap, 6.1 GB video memory charged to the process, 2.8 GB in the reservations of 1 GB and more. The heap part fits #435 in size (over 32 768 textures kept in step × 256 KiB = 8 GB), and it is gone on3db536e; I did not test #435 alone.localfigure is what is charged, not what is on the card: at the end of that run 12.3 GBlocal, of which 7.1 GB was on the card, and shared usage had grown from 4.6 to 9.9 GB.3db536eis mostly target pages (9.6–9.7 GB, 13.8 GBlocal), which still do not fit in 8 GB.XCL_DXC_THREADS=2on508a0c7(one of the four runs, warm caches): no difference beyond run-to-run variation (about 5 %).Not tested: #435 alone; a cold shader cache with fewer DXC threads.
AI use: Claude Code made the runs with me present and wrote this: Claude Fable 5.2 the first version, Claude Opus 5.5 this edit.
@EgoraWyn on GitHub · 2026-11-24 07:52 UTC · original · edited 2026-11-24 08:53 UTC
A 6 GB data point: the menus, and (edited in) the first world load.
Setup: RTX 3060 Laptop 6 GB (5994 MiB), driver 596.21 (32.0.15.9621), wave32; i5-12450H, 32 GB RAM; Windows 11 Pro 26200; release builds, Rust 1.100.0, DXC 1.9.2602.17. The same retail title, Series X profile, 3840×2160,
XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_DXC_THREADS=4, the process limited to 4 logical CPUs. No input, so each run sits at the title's first prompt: 180 s, exit 0, no crash, no device removal.Local video memory at the first prompt (MB, steady; from the
XCL_ACTIVITYmemory line; "other" = local − target-page pools − arenas − sparse pools):maindb1ddb2(before #288)2b4bb43(#288)beaa245beaa245mainis about 6.2 GB before anything streams: 58 % target-page pools, 20 % other, 14 % sparse pools, 7 % arenas. The pools go from under 1 GB to 3.6 GB in about ten seconds (30 s to 40 s in the 512 MB run), when the title sets up its renderer.nvidia-smishows it full), and yet with the learned window the title holds its 30 fps here: a 360 s run through the first-run setup screens stayed at 60 presents per 2 s from 24 s to the end, with 6342 MB local and 15.1 GB of commit. Ondb1ddb2Windows' counters showed 5588 MB dedicated and 2175 MB shared for the process at the same prompt, so roughly 1 GB of "local" was in system memory.Edit: the first world load (
main1c87b1d, by now on Windows 11 26H2 26300.9974; learned window; scripted presses through the first-run setup into the load; a watchdog of mine ends the run at 25 GB of private bytes):0x8007000eand no "no video memory" line before the watchdog.0x887a0006, the lines of #499) at 12.5 GB local. WithXCL_PAGE_BUDGET_MB=4096local video memory is 0.4 to 1.2 GB lower than in that run at equal progress (up to 2.3 GB lower than in the run of the table), and it ends the same way at 137 s. Those numbers are in https://github.com/ivall/xcl/pull/640#issuecomment-7126685328.Not tested: the Series S profile on these commits; each world-loading configuration more than once.
AI use: Claude Code (Claude Fable 5.2) ran the builds and the runs, read XCL's logs and wrote this comment and its edit; the numbers are from the runs above on this machine.
@Rednaxeh on GitHub · 2026-11-24 10:48 UTC · original
A 16 GB AMD data point for the world load, from the runs I posted on #232 / #891 (RX 7800 XT 16 GB, driver 32.0.32029.2010, Ryzen 7 7800X3D, 32 GB RAM, Windows 11 26300, release,
XCL_NETWORK=0, numbers from XCL'smemory:lines):main1c87b1dmain's path)XCL_PSO_WAIT_MS=50, two runs (loading completes)So on this card the title's video-memory shape passes 16 GB between 70 and 80 s of the run – the moment the loading art fades and presents stop – in every run that gets that far, and settles at ~22 GB once the loading is through: ~6 GB over the card, which the driver pages (the
non-local4.8 GB is the part it already keeps in system memory). NoE_OUTOFMEMORYhere; the runs end in the watchdog or, with the budget, in a GPU hang (#891). Commit is 37–40 GB on 32 GB of RAM at that point.AI use: Claude Code (Claude Fable 5.1) pulled the numbers from the logs and wrote this; the runs were mine.
@ArturoWolff on GitHub · 2026-11-24 12:33 UTC · original
Linux / RTX 4060 8 GB, 16 GB system RAM, NVIDIA 620.73.04, GE-Proton11-14, retail 1.0.2.1, release build of unmodified main
47efa2ecea0a12934719ae69b81930cf02a4b1c3. Two separate observations:XCL_COHERENT_MB=512,XCL_RAYTRACING=off), systemd recorded a kernel OOM kill in the game unit after 3m28s. The unit had noMemoryMaxorMemoryHigh. Its reported peaks were 8.4 GiB memory and 8.5 GiB swap; those are separate maxima. At 180.828s XCL reported target pages 8793 MiB / 8832 MiB pool capacity and sparse pages 1876 MiB mapped / 1920 MiB pool capacity. Those counters are not a physical VRAM total. No OPTIONS5 ray-tracing tier query was logged: the setting does not establish that the title disabled RT. Loading art only, no controllable world. This identifies the OS stop, not the allocation that triggered it.The useful next measurement is how many target pages still have live owners when the pool grows, not just the difference between pool capacity and pages accounted for. No game data or dumps attached. AI use: Hermes Agent (gpt-6.2-astra), local trial execution, log comparison and draft.
@LocranKing on GitHub · 2026-11-24 18:50 UTC · original
A Windows 11 desktop 8 GB VRAM data point on clean
main9e3831e(menus through world streaming).Setup
8024 MiB VRAM, wave32), driver32.0.16.210131.8 GBRAM26200main9e3831e1f570d3646e53ab753b19ec07eb8f1485,--release, DXC1.9.2602.17, retail 1.0.2.1 (UMA: 3 sparse VRAM window(s) (12 GiB VA) + 4095 MB coherent window at 0x400000000).XCL_NETWORK=0 XCL_ACTIVITY=1; world-load runs also setXCL_PSO_PRELOAD=0andXCL_PRESS_A_ATevery 4 s from 20 s to 80 s (+ 90, 100).Memory progression from
XCL_ACTIVITYmemory:lines (MB):0x0, 30.0 fps (1566frames)XCL_HEAP_WINDOWS=1, menus)0x0, 30.0 fps (1570frames)0x887a0006device removed at133.8 sXCL_HEAP_WINDOWS=1+XCL_PSO_WAIT_MS=50, peak)0x887a0006device removed at89.8 sXCL_HEAP_WINDOWS=1, peak)+0x23cf683watchdog at195.8 s(0device removals)XCL_PSO_WAIT_MS=50, peak)+0x23cf683watchdog at204.8 s(0device removals)Observations for 8 GB cards on Windows 11:
~6.14 GBlocal,4.88 GBnon-local,14.7 GBcommit, steady 30 fps).14.0–14.4 GB(~1.8× physical VRAM), driven primarily bytarget pagesgrowing from3.58 GBto9.90 / 10.18 GBandsparse poolsfrom0.90 GBto2.30 GB(arenasstayed flat at465 MB,non-localat4.88–4.93 GB).~14.4 GBlocal allocation withoutE_OUTOFMEMORYin two of the four runs, but process commit climbed to28.6–30.8 GBon a31.8 GBRAM machine (leaving very little headroom even withXCL_PSO_PRELOAD=0), and the other two runs hitDXGI_ERROR_DEVICE_HUNG(0x887a0006) during texture copies/uploads at11.0–12.4 GBlocal VRAM.Not tested:
XCL_COHERENT_MBreduced below 4095 MB, Series S profile, Linux/Proton, repeats per configuration.AI use: Antigravity (
Gemini 4 Neon) ran these builds and parsed the logs on this machine and drafted this comment; reviewed before posting. No game files attached.@iggyvilla on GitHub · 2026-11-25 01:35 UTC · original
Data point for the 8 GB question, on a discrete AMD card:
main930e8b4, release build,XCL_NETWORK=0 XCL_ACTIVITY=1, a scripted first-run walk into the world load (gamepad presses through the account/legal screens), retail title.Tested
video memory 6,602 MB local / 4,733 MB non-local, of which XCL's tiled-texture pools are 3,712 MB (3,624 MB of pages in use), arenas 311 MB and sparse pools 960 MB; process commit 16.4 GB.QueryVideoMemoryInfocounts what WDDM keeps in system memory), non-local 4,775 MB, commit 29.9 GB, 33.3 GB at the end.CreateHeap, no device removal. Nothing in XCL refuses or caps the growth (noXCL_PAGE_BUDGET_MBset).game_scarlett_master.exe+0x23cf683(the title's own watchdog report:+0x2215c35is in its watchdog thread, which writes to 0 after 30 one-second ticks without progress), after 421 compute pipelines had been built (the slowest 47.5 s, 37.1 s and 27.2 s, all finished by 134 s; the last at 194 s). Frames drop from 60 per 2 s to 0-46 from about 116 s and are 0 from 184 s to the stop, so the main thread was held for ~28 s; with the last pipeline built at 194 s, memory pressure is at least as likely a cause of that hold as pipeline builds. The signature is the one recorded for #505 / #581.Reading: on this 8 GB card the title is already at 6.6 GB local through the intro/legal screens and needs about 9.7 GB of target pages (15 GB local, counting what Windows demotes) by 190 s of the world load, so 8 GB does not hold it as things are. What ends this run is the
+0x23cf683access violation (#505 / #581 signature), not a refused allocation, so it is not a clean "out of memory" row.Not tested
XCL_PAGE_BUDGET_MB, #640); a run past the crash; other drivers; NVIDIA.AI use