mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1846] --expert-cache auto reports 0.00 GiB free (0 slots) on Windows/WDDM when the dGPU drives no display, while ~15 GiB is actually free #729
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#729
Loading…
Add table
Add a link
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?
Originally created by @Shoreline on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1846
Summary
With
--expert-cache auto, the engine sizes the VRAM expert tier to0.00 GiB free(0 slots) and then dies with
the embedding buffer failed— but the card actually has7–15 GiB free (verified with nvidia-smi, cudaMemGetInfo and serve/telemetry in the same
run/environment). Forcing a fixed
--expert-cache Nstarts fine, so the allocation pathis OK; only the
autofree-VRAM sizing is wrong here.Environment
motherboard iGPU, so the dGPU drives no display.
session is up (engine 0.1.40)), CUDA buildiq3_s--serve --pack <iq3_s> --native <shard1> --ple-gguf <shard2> --expert-profile expert-profile.bin --expert-cache auto --prefill auto --spec 4 --mtp <rt> --max-context 131072 --kv int8 --vision --vram-reserve-mib 256 --pcie-frac 0.00 --spec-min-p 0.50 --pool-workers 15What happens
→ the process exits before ready.
But the memory IS free (measured during the failing run)
nvidia-smi --query-gpu=memory.used,memory.free, sampled every 6 s for the whole load:peak
used 8797 MiB / free 7199 MiB(onlystrata-vision.exe+strata.exeon the card).cudaMemGetInfo→free 15037 MiB / total 16275 MiB.serve.telemetry.free_vram_mib(0)→15995.0 MiB used, 15995 MiB free.So the engine's own auto-sizing number (0) disagrees with NVML and CUDA by ~7–15 GiB.
Intermittent
Same config, same session: an earlier run logged
expert cache auto: 6.58 GiB free ... -> 2467 slotsand reachedsession is up(then hit
prefill gemm: cublasCreate: cuBLAS status 1), while later runs logged0.00 GiB free. Before moving the display to the iGPU, runs consistently reported6.6–9.4 GiB free. The move to iGPU-primary seems to be the trigger.
Workaround (confirmed)
Forcing a fixed size works:
So only the
autofree-VRAM detection is broken; a fixed--expert-cacheallocatescorrectly from the real free memory.
Suspected area
The free-VRAM query that feeds
--expert-cache auto(the sizing /expert_cache_headroom()path) appears to return ~0 on WDDM when the dGPU is not driving a display.
serve/telemetry.py'sNVML query returns the correct value in the same environment, so it looks specific to the
engine's own CUDA/WDDM free-memory read (or the moment it is sampled).
Related
#765 (VRAM budgeting order), #1841 (auto sizing / WDDM paging cliff).
Attachments
A. Full engine log of a failing run (
--expert-cache auto, exits before ready):B. Same config, only
--expert-cache 1500instead ofauto→ starts fine:C.
nvidia-smisampled every 6 s during the failing load (onlystrata-vision.exe+strata.exeon the card):D. Free VRAM as seen by other tools on the same box (idle):
@Shoreline commented on GitHub (Oct 10, 2026):
Update: root cause found, and my original hypothesis was wrong.
It is not a bad free-VRAM read and not specific to the display adapter. The expert arena pin exhausts Windows' shared GPU memory budget, after which this process's
cudaMemGetInforeturns 0 and even tinycudaMallocs fail.Numbers (Windows 11, 63.4 GiB RAM, RTX 5070 Ti, display on the Intel iGPU, 0.1.40):
cudaHostRegisteralways fails; the slice fallback ("47 slices pinned (45 GiB)") pins until it can't.Minimal repro without Strata (ctypes + cudart): allocate 6 GiB with
cudaMalloc, thencudaHostRegister1 GiB slices. Up to ~46 GiB pinned,cudaMemGetInfostays at 8.68 GiB free. When the next register fails (rc=2),cudaMemGetInforeports 0.00 GiB and a 20 KBcudaMallocalso fails (rc=2). That matches0.00 GiB free -> 0 slotsandthe embedding buffer failed.What works:
STRATA_ARENA_PIN_GIB=30and=43both start fine (128K context, vision on,--expert-cache auto).Corrections to my first post:
--expert-cacheis not a reliable workaround. It also ended with 0 slots once the budget was exhausted.Possible fix: when slice-pinning on Windows, stop with some headroom below the adapter's NON_LOCAL budget instead of pinning until failure (
gpu_shared_memory_budgetinplatform/memory.cppalready queries it). Or at least print a warning when pinned usage is within a few GiB of the budget.@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
@arspesk commented on GitHub (Oct 23, 2026):
Still happening on 0.1.44.1 (CUDA, Windows 11, RTX 5070 Ti 16 GB, 64 GB RAM, IQ3_S pack,
--expert-cache auto). After a 6-day uptime with two long sleeps, every launch failed withexpert cache auto: 0.00 GiB free ... -> 0 slots, thenno VRAM is left, thenthe embedding buffer failed.nvidia-smishowed about 8.4 GiB free during the failing run, and a fresh PyTorch process saw 15 GiB free. A reboot fixed it. A plain sleep/wake did not reproduce it.This matches the shared-budget cause in the second comment above. The log shows
cudaHostRegister of the whole arena FAILED (out of memory); 44 slices pinned (42 GiB). Without a cap, the NVIDIA adapter's shared usage was 46.39 GiB, with the engine accounting for 46.30 GiB. WithSTRATA_ARENA_PIN_GIB=40it starts normally: 39 GiB pinned, 43.28 GiB shared usage,expert cache autofinds 8.75 GiB free.The same 42 GiB pin succeeded on one launch and failed on later ones, so the margin is too thin to rely on. Could the engine leave headroom below the adapter budget when slice-pinning, or warn when pinned usage is close to it?