mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #243] Single-GPU Windows + 63 GB: sliced arena pin (28 GiB) then out of memory on every later device allocation #124
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#124
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 @icegita on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/243
Single-GPU Windows, 63 GB RAM: the arena's sliced `cudaHostRegister` (28 GiB) is followed by `out of memory` on EVERY later device allocation
Engine: 0.1.24 release (prebuilt `strata-windows-x64.zip`); the same code paths are unchanged in 0.1.29
(`src/core/pinned.cu` has no commits since v0.1.24 and `pin_limit` in `generate.cpp` is identical), so I expect 0.1.29 to fail the same way on this machine.
Machine
Symptom
`START-HERE.bat --setup --family swift --model IQ3_XXS` prepares everything, then the server reports
`RuntimeError: the engine exited before it was ready`. The engine log ends with:
```
strata generate: expert arena: cudaHostRegister of the whole arena FAILED (out of memory); 36 slices pinned (28 GiB); large pages refused for 42916118528 B ...; using 4 KB pages
strata generate: loaded 39.97 GiB at 1.28 GiB/s
strata generate: profile F:\Strata-data\mtp ... 24576 ranked pairs, built for 24576 slots
strata generate: native head upload: out of memory
```
At that moment, measured from outside the process:
It is not about the size of the allocation
Loading the native head before the arena makes the head succeed, and the very next allocation fails instead
(1 MB logits buffer), i.e. every post-arena `cudaMalloc` is refused:
```
strata generate: native head loaded before the expert arena, 437043200 bytes
strata generate: expert arena: ... 36 slices pinned (28 GiB) ...
strata generate: loaded 39.97 GiB at 1.30 GiB/s
strata generate: the logits buffer failed <-- cudaMalloc(248320 * 4) = 1 MB
```
What I ruled out (all measured on this machine)
What fixes it
The mitigation you already use for multi-GPU (8 GiB cap on mapped host pages) fixes this machine completely:
```cpp
// src/program/generate.cpp, in the resident-arena branch
```
With that one change the engine reports the arena note `cudaHostRegister limited to 8 GiB ...; 7 GiB pinned`,
reaches `READY` in 51 s, and answers requests (40-44 tok/s on this PC, expert cache 15.3 GiB, 70 % hit).
The same build is running here now on 0.1.29 source.
Questions / suggestion
DMA out of unpinned RAM instead of pinned pages; with a profile the hit rate is high (70 %+ here) and it is
far better than not starting at all. (`STRATA_ARENA_PIN_GIB` could keep it tunable, 0 = old behaviour.)
part-way, this driver/WDDM refuses every later allocation. Your own multi-GPU comment documents exactly this
("pinning all of it into two contexts leaves WDDM refusing every later allocation ... cudaMemGetInfo and the next
cudaMalloc fail"), and #158 is the same class under WSL — this report is the single-GPU variant.
error state, etc.) on this machine.
@Niko1221 commented on GitHub (Sep 30, 2026):
Thanks for the detailed report. The whole-arena pin fails, then the sliced pin goes until the driver refuses; our guess is it lands right on Windows' shared GPU memory budget (about half the RAM), so later allocations fail. 0.1.31 caps the sliced pin below that budget (and honours
STRATA_ARENA_PIN_GIB). We'll ping you when there's a build to test.@Niko1221 commented on GitHub (Oct 1, 2026):
0.1.31 adds
STRATA_ARENA_PIN_GIB=auto(in the config'senv): the sliced pin stays below the GPU's shared-memory budget minus 4 GiB. It's opt-in because on a 64 GB test PC the cap cost ~20% prompt speed while the full pin worked;STRATA_ARENA_PIN_GIB=24sets a fixed cap. Could you tryautoon your machine? Please reopen with the log if later allocations still fail.