[GH-ISSUE #5196] [Engine] "Keep experts in RAM" (--resident-experts) falls back to mmap: "cannot determine available memory for the resident-memory safety check" (0.2.10, Linux) #3093

Open
opened 2026-11-07 14:38:00 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @DO1FJN on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5196

Environment

  • Strata Desktop 0.2.10 (AppImage), engine 0.1.56-linux-x86_64-cuda-cuda13
  • Linux: openSuse 16.0 / kernel: 6.12.0-160000.40-default #1 SMP PREEMPT_DYNAMIC
  • GPU: NVIDIA GeForce RTX 4070 Ti (12 GiB), driver 580.178.04
  • RAM: 31.2 GiB, CPU: 12 physical cores / 24 threads, no AVX-512
  • Model: Qwen3.8-Flash-Next coder-IQ1_M (also tried swift-IQ2_XS)
  • Storage: NVMe (nvme1n1)

What I did

Fresh install today. In the model settings I set "Low-RAM mode" (German UI: "Modus für wenig RAM") to the middle option "Keep experts in RAM" (German: "Experten im RAM belassen"). The app starts the engine with --resident-experts. Also tried "Low-RAM-mode" set on "auto".

Expected

The experts that are not held in the GPU cache are copied into RAM, and system RAM usage grows accordingly.

Actual

The engine silently falls back to --mmap-experts. RAM usage in the monitor does not grow, and the log shows 0.0 GiB RAM copy and RAM 0 blobs.

This happens with plenty of free RAM: the UI showed 26.9 of 31.2 GB free before loading, nothing else was running, and the memory guard in the same log reports available 26.6 GiB (MemAvailable 26.6 GiB) with source: meminfo.

Log

strata generate: memory guard: limit 31.2 GiB (source: meminfo), current 4.7 GiB, reclaimable cache credited 0.0 GiB; available 26.6 GiB (MemAvailable 26.6 GiB), floor 2560 MiB
...
strata generate: WARNING: the resident RAM mode does not fit (FileExpertSource: cannot determine available memory for the resident-memory safety check; FileExpertSource: cannot determine available memory for --resident-budget-gib); the experts the GPU does not hold are read from the model folder through the OS file cache (--mmap-experts), which is slower when the RAM cannot keep them
...
strata: prefill plan inputs: 23.4 GiB experts, 3.6 GiB in the GPU caches, 0.0 GiB RAM copy (0 lend slots kept), file tier 19.8 GiB; 25.0 GiB available for the page cache

Full engine command line (from the log):
strata --serve --pack .../coder-iq1_m --native ...IQ1_M-00001-of-00002.gguf --ple-gguf ...00002-of-00002.gguf --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 32768 --kv int8 --resident-experts --ple-io mmap --vram-reserve-mib 1024

The same warning appears in all my runs with --resident-experts (4 runs on 2026-11-03/04, with different amounts of RAM in use).

Notes

  • The general memory guard can read the available memory, but the FileExpertSource check cannot. It looks like that code path reads memory info from a different source, but I have not looked into the code.
  • This also seems to affect --resident-budget-gib, according to the same message.
  • Performance with the mmap fallback is fine on a clean start (about 18 tok/s decode, 106 tok/s prompt for 6.5k tokens), so this is mainly a bug in the UI option/warning, not a speed problem. It does mean the "keep experts in RAM" setting has no effect.
  • Full log attached: strata-coder-iq1_m.log

strata-coder-iq1_m.log

Originally created by @DO1FJN on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5196 ### Environment - Strata Desktop 0.2.10 (AppImage), engine 0.1.56-linux-x86_64-cuda-cuda13 - Linux: openSuse 16.0 / kernel: 6.12.0-160000.40-default `#`1 SMP PREEMPT_DYNAMIC - GPU: NVIDIA GeForce RTX 4070 Ti (12 GiB), driver 580.178.04 - RAM: 31.2 GiB, CPU: 12 physical cores / 24 threads, no AVX-512 - Model: Qwen3.8-Flash-Next coder-IQ1_M (also tried swift-IQ2_XS) - Storage: NVMe (nvme1n1) ### What I did Fresh install today. In the model settings I set "Low-RAM mode" (German UI: "Modus für wenig RAM") to the middle option "Keep experts in RAM" (German: "Experten im RAM belassen"). The app starts the engine with `--resident-experts`. Also tried "Low-RAM-mode" set on "auto". ### Expected The experts that are not held in the GPU cache are copied into RAM, and system RAM usage grows accordingly. ### Actual The engine silently falls back to `--mmap-experts`. RAM usage in the monitor does not grow, and the log shows `0.0 GiB RAM copy` and `RAM 0 blobs`. This happens with plenty of free RAM: the UI showed 26.9 of 31.2 GB free before loading, nothing else was running, and the memory guard in the same log reports `available 26.6 GiB (MemAvailable 26.6 GiB)` with `source: meminfo`. ### Log ``` strata generate: memory guard: limit 31.2 GiB (source: meminfo), current 4.7 GiB, reclaimable cache credited 0.0 GiB; available 26.6 GiB (MemAvailable 26.6 GiB), floor 2560 MiB ... strata generate: WARNING: the resident RAM mode does not fit (FileExpertSource: cannot determine available memory for the resident-memory safety check; FileExpertSource: cannot determine available memory for --resident-budget-gib); the experts the GPU does not hold are read from the model folder through the OS file cache (--mmap-experts), which is slower when the RAM cannot keep them ... strata: prefill plan inputs: 23.4 GiB experts, 3.6 GiB in the GPU caches, 0.0 GiB RAM copy (0 lend slots kept), file tier 19.8 GiB; 25.0 GiB available for the page cache ``` Full engine command line (from the log): `strata --serve --pack .../coder-iq1_m --native ...IQ1_M-00001-of-00002.gguf --ple-gguf ...00002-of-00002.gguf --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp ... --max-context 32768 --kv int8 --resident-experts --ple-io mmap --vram-reserve-mib 1024` The same warning appears in all my runs with `--resident-experts` (4 runs on 2026-11-03/04, with different amounts of RAM in use). ### Notes - The general memory guard can read the available memory, but the `FileExpertSource` check cannot. It looks like that code path reads memory info from a different source, but I have not looked into the code. - This also seems to affect `--resident-budget-gib`, according to the same message. - Performance with the mmap fallback is fine on a clean start (about 18 tok/s decode, 106 tok/s prompt for 6.5k tokens), so this is mainly a bug in the UI option/warning, not a speed problem. It does mean the "keep experts in RAM" setting has no effect. - Full log attached: `strata-coder-iq1_m.log` [strata-coder-iq1_m.log](https://github.com/user-attachments/files/34363575/strata-coder-iq1_m.log)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 4, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6627126529 --> @github-actions[bot] commented on GitHub (Nov 4, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 4, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6627541851 --> @github-actions[bot] commented on GitHub (Nov 4, 2026): Thanks, this follows the format now.
Author
Owner

@ThePouX01 commented on GitHub (Nov 7, 2026):

Same issue on Linux with Strata 0.2.11 / engine 0.1.58 (CUDA 13), one extra detail: --memory-limit-mib is used by the memory guard but not by FileExpertSource.

Setup: Ubuntu 24.04 container on TrueNAS SCALE 27 (64 GB RAM host, RTX PRO 2000 Blackwell 16 GB), Qwen3.8-Flash-Next IQ3_S, 128K context. The container has no memory limit, so /proc/meminfo shows ~1 TB, which is why I set --memory-limit-mib.

Flags: --resident-experts --memory-limit-mib 30720 --ple-io direct --conversation-cache-mib 4096

Log:

  • memory guard: limit 30.0 GiB (source: flag) ... available 27.0 GiB
  • WARNING: the resident RAM mode does not fit (FileExpertSource: cannot determine available memory for the resident-memory safety check; ... for --resident-budget-gib); ... read through the OS file cache (--mmap-experts)
  • prefill plan inputs: 46.8 GiB experts, 8.7 GiB in the GPU caches, 0.0 GiB RAM copy

So the memory guard and the prefill planner see the 30 GiB limit, but the resident check still falls back to plain mmap. Expected: the resident check uses the same memory source as the guard and keeps the hottest experts that fit under the limit.

Speed with plain mmap: ~8-12 tok/s. The same machine runs Gyro-M with the full resident arena at 42-73 tok/s, so a working RAM budget would help a lot on 64 GB hosts.

<!-- gh-comment-id:6710113451 --> @ThePouX01 commented on GitHub (Nov 7, 2026): Same issue on Linux with Strata 0.2.11 / engine 0.1.58 (CUDA 13), one extra detail: --memory-limit-mib is used by the memory guard but not by FileExpertSource. Setup: Ubuntu 24.04 container on TrueNAS SCALE 27 (64 GB RAM host, RTX PRO 2000 Blackwell 16 GB), Qwen3.8-Flash-Next IQ3_S, 128K context. The container has no memory limit, so /proc/meminfo shows ~1 TB, which is why I set --memory-limit-mib. Flags: --resident-experts --memory-limit-mib 30720 --ple-io direct --conversation-cache-mib 4096 Log: - memory guard: limit 30.0 GiB (source: flag) ... available 27.0 GiB - WARNING: the resident RAM mode does not fit (FileExpertSource: cannot determine available memory for the resident-memory safety check; ... for --resident-budget-gib); ... read through the OS file cache (--mmap-experts) - prefill plan inputs: 46.8 GiB experts, 8.7 GiB in the GPU caches, 0.0 GiB RAM copy So the memory guard and the prefill planner see the 30 GiB limit, but the resident check still falls back to plain mmap. Expected: the resident check uses the same memory source as the guard and keeps the hottest experts that fit under the limit. Speed with plain mmap: ~8-12 tok/s. The same machine runs Gyro-M with the full resident arena at 42-73 tok/s, so a working RAM budget would help a lot on 64 GB hosts.
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#3093
No description provided.