xcl run: warn when a drive a run writes to is nearly full #3058
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3058"
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?
Imported from ivall/xcl. Originally posted by imnicho on 2026-11-27T18:27:47Z.
A run writes to three places: XCL's data folder (
XCL_DATA_ROOT), XCL's shader cache (XCL_DXIL_CACHE) and, through the GPU driver, the driver's own shader cache, which stays on the drive of the user's profile wherever the other two are. On my machine that third one filled the system drive in the middle of a run series, with XCL's own folders on another drive, and nothing a run printed said so. This adds those drives to whatxcl runchecks before the game starts, and says in the README where the driver's cache is and what caps it.What was measured (RTX 5080, driver 610.47, Windows 10 22H2, 16 GB RAM):
%LOCALAPPDATA%\NVIDIA\DXCacheheld 45.4 GB in 276 files. 34.6 GB of it was the 10 files ofxcl.exe, all written within two days of runs of a retail title onnvidia-dev: two sets of growing files (0.25, 1, 2 and 8 GB in one; 0.25, 0.25, 2, 4 and 16 GB in the other).%TEMP%then failed; the title's runs were stopped by hand.#3048 (open,
nvidia-dev) comes at the same file from the memory side: the driver maps it into the process, andXCL_DRIVER_SHADER_CACHE=0there refuses it the file. This PR does not touch that; it only makes the disk side visible, on every vendor's driver (their caches are under the profile too).What is in it
preflight.rs:Drive(root, free bytes, what a run writes there),drives(the folders a run writes, grouped by drive),free_bytes(GetDiskFreeSpaceExW),DRIVE_FREE_LEAST(4 GiB).checksadds a WARNING for each drive under it, with what the run writes there and what to do:drive C:\ has 4095 MB free, and a run writes there: XCL's data and logs, the GPU driver's own shader cache. It is printed before the game starts and again in the summary at the end, and is inreport.json'senvironment, like the other checks. A PC with room prints nothing new.README.md: a "Drive space" entry under "Building and usage" with the folder, the growth measured above and the driver's own setting that caps it.preflight::tests):a_nearly_full_drive_a_run_writes_to_is_reported,the_folders_a_run_writes_are_grouped_by_drive(one drive whatever the letter's case, a UNC share, a relative folder and a drive that does not answer left out),the_temp_folders_drive_has_a_free_space(the real call).Tested
cargo test --workspace --no-fail-fast -- --test-threads=4: 1,468 passed, 0 failed, 47 ignored. That wasbc3fb395, this head before one doc comment was reworded (no code changed); the 9preflighttests were run again on the head. A run before it without--no-fail-faststopped at one failure,hle::d3d12x::list_x::tests::cross_queue_wait64_before_signal_does_not_deadlock_submit_threadwith0x8007000E(out of memory, on this 16 GB machine with four test threads); that test passed alone and in the full run above. It does not touch the changed file.SKIPPEDlines: 21 wave64 forms (no wave64 on this adapter), 3 per-lane f16 / f32 forms refused, 2 of the title under the debug layer and 1 upload test (no D3D12 debug layer here), 1no heap windows, 1 that cannot turn the driver cache off (no Developer Mode).preflighttests 6 are old and 3 new.Regression run
Both with
XCL_PREPARE=0(the preparation of every record does not fit a 60 s run on a cold cache) and the shader cache on another drive than the system's.main:
this PR:
More runs of the same 60 s: one of
main(852 frames, peak commit 17,995 MB) and two of this PR atbc3fb395(833 and 850 frames; 17,994 and 17,998 MB).Not tested
xcl runprints nothing new (as in the two runs above).AI use
Claude Code with Claude Fable 5.2 wrote the change, the tests and this text, and ran the suite and the runs.
🤖 Generated with Claude Code
Pull request closed