[GH-ISSUE #730] WARNING: the RAM budget (--resident-budget-gib) cannot be kept - experimental Q4 #336

Closed
opened 2026-11-04 01:42:05 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @SladeThe on GitHub (Oct 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/730

Hey!

When I try to load the experimental Q4 unsloth model, I see the following strange behaviour:
VRAM gets filled up (~15 GB), but RAM doesn't (~ 0 usage).

Any expert missing in the GPU memory is streamed from the SSD.
Therefore the performance is deadly slow, about or even less than 1 t/s.
IQ3 works fine with exactly the same settings, ~50 t/s.

I suppose the main reason is around this warning:

FileExpertSource: available RAM 73.21 GiB, 73.31 GiB after the mapped experts left the process working set (#467)
FileExpertSource: RAM budget 66.00 GiB: 22569 of the 65.88 GiB of experts the GPU cache does not hold, by profile rank; the rest are read from the files
FileExpertSource: allocating 65.88 GiB page-locked cache complement
strata generate: WARNING: the RAM budget (--resident-budget-gib) cannot be kept (FileExpertSource: pageable resident complement allocation failed); every expert the GPU does not hold is read from the model files through the OS file cache (--mmap-experts), which is slower

I've seen a few similar issues, which are already closed.
But I'm running the latest version on Oct, 4 and still facing the problem.

The config and log files with absolute paths replaced with ...:
strata-unsloth-ud-q4_k_xl.json
strata-unsloth-ud-q4_k_xl.log

System specs: Windows 11, R9 9900X, 96 GB, 6900 XT 16 GB.

Originally created by @SladeThe on GitHub (Oct 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/730 Hey! When I try to load the experimental Q4 unsloth model, I see the following strange behaviour: \ VRAM gets filled up (\~15 GB), but RAM doesn't (\~ 0 usage). Any expert missing in the GPU memory is streamed from the SSD. \ Therefore the performance is deadly slow, about or even less than 1 t/s. \ IQ3 works fine with exactly the same settings, ~50 t/s. I suppose the main reason is around this warning: ``` FileExpertSource: available RAM 73.21 GiB, 73.31 GiB after the mapped experts left the process working set (#467) FileExpertSource: RAM budget 66.00 GiB: 22569 of the 65.88 GiB of experts the GPU cache does not hold, by profile rank; the rest are read from the files FileExpertSource: allocating 65.88 GiB page-locked cache complement strata generate: WARNING: the RAM budget (--resident-budget-gib) cannot be kept (FileExpertSource: pageable resident complement allocation failed); every expert the GPU does not hold is read from the model files through the OS file cache (--mmap-experts), which is slower ``` I've seen a few similar issues, which are already closed. \ But I'm running the latest version on Oct, 4 and still facing the problem. The config and log files with absolute paths replaced with `...`: [strata-unsloth-ud-q4_k_xl.json](https://github.com/user-attachments/files/33020032/strata-unsloth-ud-q4_k_xl.json) [strata-unsloth-ud-q4_k_xl.log](https://github.com/user-attachments/files/33020031/strata-unsloth-ud-q4_k_xl.log) System specs: Windows 11, R9 9900X, 96 GB, 6900 XT 16 GB.
Author
Owner

@SladeThe commented on GitHub (Oct 4, 2026):

Manually setting --resident-budget-gib to 40 (down from 66) did help — 60, and even 50 did not.
With 40 gigs, the inference speed increased from ~1 t/s to ~4 t/s. Still, more than 10 times slower than IQ3.
The SSD appears to be the bottleneck.

The engine fails to allocate a contiguous block of RAM for the page-locked complement, even though there is enough total system memory available.

As a suggestion, add an option to satisfy --resident-budget-gib with several smaller page-locked allocations instead of one all-or-nothing request.

The single-vs-multiple-memory-chunks assumption was incorrect.

Local testing revealed that on Windows you have to respect commit capacity when allocating memory.

I've opened a PR to handle the issue.

<!-- gh-comment-id:5977843730 --> @SladeThe commented on GitHub (Oct 4, 2026): Manually setting `--resident-budget-gib` to 40 (down from 66) **did help** — 60, and even 50 did **not**. With 40 gigs, the inference speed increased from \~1 t/s to \~4 t/s. Still, more than 10 times slower than IQ3. The SSD appears to be the bottleneck. ~~The engine fails to allocate a contiguous block of RAM for the page-locked complement, even though there is enough total system memory available.~~ ~~As a suggestion, add an option to satisfy `--resident-budget-gib` with several smaller page-locked allocations instead of one all-or-nothing request.~~ The single-vs-multiple-memory-chunks assumption was incorrect. Local testing revealed that on Windows you have to respect commit capacity when allocating memory. I've opened a PR to handle the issue.
Author
Owner

@Niko1221 commented on GitHub (Oct 6, 2026):

Fixed in 0.1.40 by #749: the RAM budget now respects the Windows commit limit.

<!-- gh-comment-id:6010906773 --> @Niko1221 commented on GitHub (Oct 6, 2026): Fixed in 0.1.40 by #749: the RAM budget now respects the Windows commit limit.
Sign in to join this conversation.
No milestone
No project
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
Niko1221/Strata#336
No description provided.