[GH-ISSUE #5496] [Engine] split engine 0.2.11: the prompt-path auto pick counts the arena's unallocated expert slots as free VRAM, so 3x RTX 3090 24 GB fails to start ("VRAM short" -> "pool 3 has 271 slots, a window needs 320") #5465

Open
opened 2026-11-07 21:43:11 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @chaerle on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5496

Area

[Engine]

Desktop app, Terminal or source?

Source (own build of v0.2.11)

What happened

On v0.2.11 the all-cards split engine (strata-split-3) no longer starts on 3x RTX 3090 24 GB with the Qwen3.8-Flash-Next GSQ-RCO IQ3_S set. The same configuration started and ran a full test suite on v0.2.10 (ffa80d73) the day before.

The engine reports "VRAM short by ~1.8 GiB", moves ~3,100 more experts to RAM, and then stops in place_experts():

fnx: 1460 of 24576 routed experts (3.0 GiB) in RAM, ranked by .../src/split/data/expert-routes.bin
fnx: HOSTRING build: the cards exchange through page-locked host memory; peer access is never enabled, no peer probe, IOMMU and BAR1 checks skipped
fnx: VRAM short by 1794 MiB on a card (another process on it?): 3117 more of the coldest experts to RAM
fnx: 4577 of 24576 routed experts (9.2 GiB) in RAM, ranked by .../src/split/data/expert-routes.bin (3117 of them because VRAM was short)
sfnx: failed: card 0: expert cache: pool 3 has 271 slots, a window needs 320 (fewer experts in RAM)

No other process was on GPU 0-2 (nvidia-smi: 56 / 3 / 3 MiB used before the start). A fourth RTX 3090 (GPU 3) drives the desktop and is not one of the engine's cards.

Cause (from reading the source, confirmed by the runs below)

New in 0.2.11, Engine::Engine (src/split/src/engine.cu, around line 84) picks the prompt path's rows and chunks per pass (8192 x 4 = 4148 MiB down to 4096 x 2 = 1112 MiB) from cudaMemGetInfo on each card. With FNX_ARENA (the default) the largest expert pool's slots are not allocated at that point: Model::expert_cache leaves them to Engine::arena_fill (model.cpp around line 319). On this box that pool is 9,860 slots x 0.56-0.66 MiB, about 5.4-6.3 GiB per card, so the pick sees that much more free VRAM than there will be and takes 8192 x 4 (no "prompt path:" line is printed, which means the pick was 8192 x 4). The arena sizing further down then comes up ~1.8 GiB short, the "VRAM short" loop moves experts to RAM, and the smallest pool (pool 3) drops below 2MAXTTOPK = 320 slots.

On 48/96 GB cards the extra 3 GiB of prompt buffers fit, which is probably why the tested setups (2x RTX A6000, 2x RTX PRO 6000) do not show it. On 2x RTX 4060 Ti 16 GB (#5187) the pick falls to 4096 x 2 anyway because even the overestimated free VRAM is small.

Results (same machine, same config, one start each; logs below)

Run Engine FNX_PF_* Result Free VRAM after the arena (card 0/1/2) Free after load
T1 v0.2.11 as released unset fails: VRAM short 1794 MiB, pool 3 has 271 slots - -
T2 v0.2.11 FNX_PF_ROWS=4096 FNX_PF_PASS=4 loads in 133 s, 3.0 GiB experts in RAM (as on 0.2.10) 548 / 601 / 3067 MiB 318 / 371 / 2837 MiB
T3 v0.2.11 + patch below unset loads in 141 s, picks 4096 x 2 by itself ("the cards hold 3904 MiB free after the weights, the K/V pool 609 MiB") 1028 / 1081 / 3547 MiB 798 / 851 / 3317 MiB
ref v0.2.10 (ffa80d73) unset loads in 159 s 540 / 593 / 3059 MiB 296 / 349 / 2815 MiB

tools/strata_bench.py --runs 3 --long on T2 and T3 (medians):

T2 (4096 x 4, by hand) T3 (patch, auto 4096 x 2)
chat decode tok/s 186.4 (161.3-238.2) 192.9 (164.1-239.6)
4K prompt tok/s 1290.6 1305.1
16K prompt tok/s 1832.7 1794.9
32K prompt tok/s 1865.1 1814.7
agent decode tok/s 175.5 171.6

So 4096 x 4 also fits here and reads 16K/32K prompts ~2-3 % faster; the patched pick is conservative (the 2000 MiB margin) but starts by itself.

Proposed fix (7 lines, src/split/src/engine.cu; tested as T3 on this machine only, CUDA build only, HIP not built)

@@ -89,6 +89,13 @@ Engine::Engine(Model& m, int max_ctx, int lanes) : m_(m), max_ctx_(max_ctx) {
                 ck(cudaSetDevice(m.cards[c].dev), "cudaSetDevice");
                 size_t fr = 0, tot = 0;
                 ck(cudaMemGetInfo(&fr, &tot), "cudaMemGetInfo");
+                // with FNX_ARENA the largest pool's expert slots are not allocated yet (Engine::arena_fill puts them in the arena
+                // further down), so the free VRAM here still counts them: without this, 3 x 24 GB picked 8192 x 4 and came up short
+                const ExpertCache& ec = m.cards[c].ec;
+                if (m.arena && ec.arena_pool >= 0) {
+                    const size_t slots = (size_t) ec.n[ec.arena_pool] * ec.slot_bytes[ec.arena_pool];
+                    fr = fr > slots ? fr - slots : 0;
+                }
                 free_min = std::min(free_min, fr);
                 kv_max = std::max(kv_max, (size_t) n_pages * kvp_page(c) * sizeof(uint16_t));
             }

Not covered by the patch: the two prompt stages (2 * pf_stage_bytes, 2 x 384 MiB here) are also not in the pick; they fit inside PF_MARGIN_MIB on this box. I did not run the HIP build or other card sizes.

Workaround on 0.2.11 without a rebuild: "env": {"FNX_PF_ROWS": "4096", "FNX_PF_PASS": "4"} in the run config.
With this workaround the engine also starts with --batch 3, 5 and 8 on the same cards (free VRAM on GPU 0 after load 276 / 254 / 252 MiB, no further experts moved to RAM); a full test pass with --batch 5 ran without errors.

Smallest steps or command that reproduce it

  1. Build v0.2.11 with -DSTRATA_BUILD_SPLIT=ON -DSTRATA_SPLIT_CARDS="2;3" -DSTRATA_SPLIT_ARCH=86.
  2. Start the split engine on 3x RTX 3090 24 GB (Linux, LimitMEMLOCK=infinity) with the IQ3_S set, context 65536, --spec 6 --lookup 15 --batch 1 --vision, no FNX_* variables except STRATA_NO_ARENA_THP=1:
strata-split-3 --serve --native Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --mtp <mtp dir> --draft-vocab data/draft_vocab_en.bin --max-context 65536 --spec 6 --lookup 15 --conversation-cache-mib 4096 --batch 1 --vision --layer-split auto

Reproduction status

Reproduced locally

Strata version

Strata v0.2.11 (c3b3f503), engine 0.1.57, source build (CUDA 13.2, sm_86, -DSTRATA_NATIVE_EXPERTS=ON), HOSTRING (no peer access)

Graphics card, memory and system

  • 4x NVIDIA GeForce RTX 3090 24 GB (driver 595.99.02): GPU 0-2 for the engine (PCIe 3.0 x8 / x8 / x16, same NUMA node, power limit 350/370/350 W), GPU 3 drives the desktop (x16, other NUMA node)
  • 2x Xeon E5-2696 v4 (44 cores / 88 threads, 2 NUMA nodes, no AVX-512), 503 GiB RAM, model on NVMe (ZFS mirror)
  • Ubuntu 26.04.1, kernel 6.17.0-29

Model, size and settings

  • Model: SC117/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-GGUF IQ3_S (2 files), MTP layer from Strata's mtp/rt, mmproj BF16
  • Context 65536, 1 slot, MTP --spec 6 --lookup 15, conversation cache 4096 MiB, defaults otherwise (arena on, coldest 3 GiB of experts in RAM)

Logs

Local directories are replaced by placeholders (<strata> = the Strata checkout, <data> = the model data directory, <report> = the output folder).

engine-log-T1-stock.txt (v0.2.11 as released: fails)
strata-vision: model files loaded in 2.0 s
strata-vision: warmed up at 1024 image tokens in 0.7 s
[strata] 2026-11-07 10:59:51 engine started: <strata>/build/strata-split-3 --serve --native Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --mtp <data>/mtp/rt --draft-vocab <strata>/data/draft_vocab_en.bin --max-context 65536 --spec 6 --lookup 15 --conversation-cache-mib 4096 --batch 1 --vision --layer-split auto
gguf: 676 dense/small tensors converted to Q8_0/F32 at load (the file's routed experts keep their types)
fnx: token_embd.weight and per_layer_token_embd.weight (29.5 GB) locked in RAM in 3.1 s
fnx: 1460 of 24576 routed experts (3.0 GiB) in RAM, ranked by <strata>/src/split/data/expert-routes.bin
fnx: weights read in 14.0 s of reading (49.1 GB from the disk at 3.52 GB/s, 0.0 GB from the page cache), placed in 43.6 s
fnx: draft layer experts q2_0
fnx: HOSTRING build: the cards exchange through page-locked host memory; peer access is never enabled, no peer probe, IOMMU and BAR1 checks skipped
fnx: VRAM short by 1794 MiB on a card (another process on it?): 3117 more of the coldest experts to RAM
fnx: 4577 of 24576 routed experts (9.2 GiB) in RAM, ranked by <strata>/src/split/data/expert-routes.bin (3117 of them because VRAM was short)
sfnx: failed: card 0: expert cache: pool 3 has 271 slots, a window needs 320 (fewer experts in RAM)
engine-log-T2-workaround.txt (FNX_PF_ROWS=4096 FNX_PF_PASS=4: loads)
strata-vision: model files loaded in 1.9 s
strata-vision: warmed up at 1024 image tokens in 0.7 s
[strata] 2026-11-07 11:02:43 engine started: <strata>/build/strata-split-3 --serve --native Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --mtp <data>/mtp/rt --draft-vocab <strata>/data/draft_vocab_en.bin --max-context 65536 --spec 6 --lookup 15 --conversation-cache-mib 4096 --batch 1 --vision --layer-split auto
gguf: 676 dense/small tensors converted to Q8_0/F32 at load (the file's routed experts keep their types)
fnx: token_embd.weight and per_layer_token_embd.weight (29.5 GB) locked in RAM in 3.0 s
fnx: 1460 of 24576 routed experts (3.0 GiB) in RAM, ranked by <strata>/src/split/data/expert-routes.bin
fnx: weights read in 12.8 s of reading (49.1 GB from the disk at 3.85 GB/s, 0.0 GB from the page cache), placed in 43.7 s
fnx: draft layer experts q2_0
fnx: HOSTRING build: the cards exchange through page-locked host memory; peer access is never enabled, no peer probe, IOMMU and BAR1 checks skipped
fnx: arena: card 0: 548 MiB free after its arena
fnx: arena: card 1: 601 MiB free after its arena
fnx: arena: card 2: 3067 MiB free after its arena
fnx: arena: the K/V pool's own 600 pages (115200 positions), up to 5897 (1132224 positions) by lending the slots of 9860 x 0.66 MiB (6.3 GiB), 9860 x 0.66 MiB (6.3 GiB), 9860 x 0.56 MiB (5.4 GiB)
fnx: warm: prompt path (1100 tokens) ...
fnx: warm: prompt path done
fnx: warm: verify windows ...
fnx: warm: verify 1 rows done
fnx: warm: verify 16 rows done
sfnx: loaded in 133.2 s, context 65536, MTP K=6, lookup 15, 1 slot(s); 3 cards, sums between them fp16; K/V pool (int8) 1132224 positions free; VRAM free 318 / 371 / 2837 MiB
engine-log-T3-patched.txt (patch below, no FNX_PF_*: loads)
strata-vision: model files loaded in 1.8 s
strata-vision: warmed up at 1024 image tokens in 0.6 s
[strata] 2026-11-07 11:05:32 engine started: <strata>/build/src/split/strata-split-3 --serve --native Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --mtp <data>/mtp/rt --draft-vocab <strata>/data/draft_vocab_en.bin --max-context 65536 --spec 6 --lookup 15 --conversation-cache-mib 4096 --batch 1 --vision --layer-split auto
gguf: 676 dense/small tensors converted to Q8_0/F32 at load (the file's routed experts keep their types)
fnx: token_embd.weight and per_layer_token_embd.weight (29.5 GB) locked in RAM in 3.6 s
fnx: 1460 of 24576 routed experts (3.0 GiB) in RAM, ranked by <strata>/src/split/data/expert-routes.bin
fnx: weights read in 15.8 s of reading (49.1 GB from the disk at 3.11 GB/s, 0.0 GB from the page cache), placed in 48.4 s
fnx: draft layer experts q2_0
fnx: prompt path: 4096 rows, 2 chunks a pass (the cards hold 3904 MiB free after the weights, the K/V pool 609 MiB)
fnx: HOSTRING build: the cards exchange through page-locked host memory; peer access is never enabled, no peer probe, IOMMU and BAR1 checks skipped
fnx: arena: card 0: 1028 MiB free after its arena
fnx: arena: card 1: 1081 MiB free after its arena
fnx: arena: card 2: 3547 MiB free after its arena
fnx: arena: the K/V pool's own 600 pages (115200 positions), up to 5897 (1132224 positions) by lending the slots of 9860 x 0.66 MiB (6.3 GiB), 9860 x 0.66 MiB (6.3 GiB), 9860 x 0.56 MiB (5.4 GiB)
fnx: warm: prompt path (1100 tokens) ...
fnx: warm: prompt path done
fnx: warm: verify windows ...
fnx: warm: verify 1 rows done
fnx: warm: verify 16 rows done
sfnx: loaded in 141.4 s, context 65536, MTP K=6, lookup 15, 1 slot(s); 3 cards, sums between them fp16; K/V pool (int8) 1132224 positions free; VRAM free 798 / 851 / 3317 MiB
run_tests.sh (the test script; local directories replaced by placeholders)
#!/bin/bash
# Strata 0.2.11, split engine (sFNX, strata-split-3) on 3x RTX 3090 24 GB + a 4th RTX 3090 that drives the desktop.
# T1  v0.2.11 as released, no FNX_PF_* set         -> expected: start fails (prompt-path auto pick 8192 x 4, VRAM short, expert cache pool error)
# T2  v0.2.11 + FNX_PF_ROWS=4096 FNX_PF_PASS=4      -> workaround: loads
# T3  v0.2.11 + patch (arena slots counted), no env -> loads by itself
# T4/T5 tools/strata_bench.py (3 runs, --long) on the T2 and T3 configurations, vision encoder on the 4th card (vision.cuda_device=3)
# Needs: LimitMEMLOCK=infinity (systemd-run --user -p LimitMEMLOCK=infinity ...), nothing else on GPU 0-2.
set -u
OUT=<report>; CFG=$OUT/configs; PY=python3; cd <strata>
echo "memlock: $(ulimit -l)"
start_until_loaded() {   # $1 name, $2 config
  local log; log=$($PY -c "import json,sys;print(json.load(open(sys.argv[1]))['log'])" "$2"); rm -f "$log"
  echo "== $1 $(date '+%F %T')"
  $PY serve/server.py --engine strata --config "$2" --port 8080 > "$OUT/$1-server.txt" 2>&1 &
  local pid=$!
  for i in $(seq 1 120); do sleep 5; grep -qE "sfnx: (loaded|failed)|out of memory|Traceback" "$log" 2>/dev/null && break; kill -0 $pid 2>/dev/null || break; done
  sleep 3; cp "$log" "$OUT/$1-engine.log"
  grep -E "VRAM short|in RAM|prompt path|arena: card|sfnx:" "$log" | grep -v "slot 0:"
  nvidia-smi --query-gpu=index,memory.used --format=csv,noheader | tr '\n' ' '; echo
  kill $pid; wait $pid 2>/dev/null; sleep 5
  pkill -x strata-split-3; pkill -x strata-vision; sleep 5
}
[ "${SKIP_T1:-0}" = 1 ] || start_until_loaded T1-stock     $CFG/t1-stock.json
start_until_loaded T2-workaround $CFG/t2-workaround.json
start_until_loaded T3-patched   $CFG/t3-patched.json
for t in T2-workaround:t2-workaround T3-patched:t3-patched; do
  n=${t%%:*}; c=${t##*:}; echo "== bench $n $(date '+%F %T')"
  $PY tools/strata_bench.py --config $CFG/$c.json --runs 3 --long --out $OUT/bench-$n --ready-timeout 900 > $OUT/bench-$n.txt 2>&1
  tail -25 $OUT/bench-$n.txt
  pkill -x strata-split-3; pkill -x strata-vision; sleep 5
done
echo "FERTIG $(date '+%F %T')"

Related: #5187 and #5258 (per-pool floor; same pool-3 error, different trigger: 16 GB cards with most experts in RAM), #5440 (staging threshold).

A community benchmark of the same setup (split engine on 3x RTX 3090, --batch 1/3/5/8, full test pass) follows as a results-only PR.

Originally created by @chaerle on GitHub (Nov 7, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5496 ### Area [Engine] ### Desktop app, Terminal or source? Source (own build of v0.2.11) ### What happened On v0.2.11 the all-cards split engine (`strata-split-3`) no longer starts on 3x RTX 3090 24 GB with the Qwen3.8-Flash-Next GSQ-RCO IQ3_S set. The same configuration started and ran a full test suite on v0.2.10 (ffa80d73) the day before. The engine reports "VRAM short by ~1.8 GiB", moves ~3,100 more experts to RAM, and then stops in `place_experts()`: ```text fnx: 1460 of 24576 routed experts (3.0 GiB) in RAM, ranked by .../src/split/data/expert-routes.bin fnx: HOSTRING build: the cards exchange through page-locked host memory; peer access is never enabled, no peer probe, IOMMU and BAR1 checks skipped fnx: VRAM short by 1794 MiB on a card (another process on it?): 3117 more of the coldest experts to RAM fnx: 4577 of 24576 routed experts (9.2 GiB) in RAM, ranked by .../src/split/data/expert-routes.bin (3117 of them because VRAM was short) sfnx: failed: card 0: expert cache: pool 3 has 271 slots, a window needs 320 (fewer experts in RAM) ``` No other process was on GPU 0-2 (`nvidia-smi`: 56 / 3 / 3 MiB used before the start). A fourth RTX 3090 (GPU 3) drives the desktop and is not one of the engine's cards. **Cause (from reading the source, confirmed by the runs below)** New in 0.2.11, `Engine::Engine` (src/split/src/engine.cu, around line 84) picks the prompt path's rows and chunks per pass (8192 x 4 = 4148 MiB down to 4096 x 2 = 1112 MiB) from `cudaMemGetInfo` on each card. With `FNX_ARENA` (the default) the largest expert pool's slots are not allocated at that point: `Model::expert_cache` leaves them to `Engine::arena_fill` (model.cpp around line 319). On this box that pool is 9,860 slots x 0.56-0.66 MiB, about 5.4-6.3 GiB per card, so the pick sees that much more free VRAM than there will be and takes 8192 x 4 (no "prompt path:" line is printed, which means the pick was 8192 x 4). The arena sizing further down then comes up ~1.8 GiB short, the "VRAM short" loop moves experts to RAM, and the smallest pool (pool 3) drops below 2*MAXT*TOPK = 320 slots. On 48/96 GB cards the extra 3 GiB of prompt buffers fit, which is probably why the tested setups (2x RTX A6000, 2x RTX PRO 6000) do not show it. On 2x RTX 4060 Ti 16 GB (#5187) the pick falls to 4096 x 2 anyway because even the overestimated free VRAM is small. **Results** (same machine, same config, one start each; logs below) | Run | Engine | FNX_PF_* | Result | Free VRAM after the arena (card 0/1/2) | Free after load | |---|---|---|---|---|---| | T1 | v0.2.11 as released | unset | fails: VRAM short 1794 MiB, pool 3 has 271 slots | - | - | | T2 | v0.2.11 | `FNX_PF_ROWS=4096 FNX_PF_PASS=4` | loads in 133 s, 3.0 GiB experts in RAM (as on 0.2.10) | 548 / 601 / 3067 MiB | 318 / 371 / 2837 MiB | | T3 | v0.2.11 + patch below | unset | loads in 141 s, picks 4096 x 2 by itself ("the cards hold 3904 MiB free after the weights, the K/V pool 609 MiB") | 1028 / 1081 / 3547 MiB | 798 / 851 / 3317 MiB | | ref | v0.2.10 (ffa80d73) | unset | loads in 159 s | 540 / 593 / 3059 MiB | 296 / 349 / 2815 MiB | `tools/strata_bench.py --runs 3 --long` on T2 and T3 (medians): | | T2 (4096 x 4, by hand) | T3 (patch, auto 4096 x 2) | |---|---|---| | chat decode tok/s | 186.4 (161.3-238.2) | 192.9 (164.1-239.6) | | 4K prompt tok/s | 1290.6 | 1305.1 | | 16K prompt tok/s | 1832.7 | 1794.9 | | 32K prompt tok/s | 1865.1 | 1814.7 | | agent decode tok/s | 175.5 | 171.6 | So 4096 x 4 also fits here and reads 16K/32K prompts ~2-3 % faster; the patched pick is conservative (the 2000 MiB margin) but starts by itself. **Proposed fix** (7 lines, src/split/src/engine.cu; tested as T3 on this machine only, CUDA build only, HIP not built) ```diff @@ -89,6 +89,13 @@ Engine::Engine(Model& m, int max_ctx, int lanes) : m_(m), max_ctx_(max_ctx) { ck(cudaSetDevice(m.cards[c].dev), "cudaSetDevice"); size_t fr = 0, tot = 0; ck(cudaMemGetInfo(&fr, &tot), "cudaMemGetInfo"); + // with FNX_ARENA the largest pool's expert slots are not allocated yet (Engine::arena_fill puts them in the arena + // further down), so the free VRAM here still counts them: without this, 3 x 24 GB picked 8192 x 4 and came up short + const ExpertCache& ec = m.cards[c].ec; + if (m.arena && ec.arena_pool >= 0) { + const size_t slots = (size_t) ec.n[ec.arena_pool] * ec.slot_bytes[ec.arena_pool]; + fr = fr > slots ? fr - slots : 0; + } free_min = std::min(free_min, fr); kv_max = std::max(kv_max, (size_t) n_pages * kvp_page(c) * sizeof(uint16_t)); } ``` Not covered by the patch: the two prompt stages (`2 * pf_stage_bytes`, 2 x 384 MiB here) are also not in the pick; they fit inside `PF_MARGIN_MIB` on this box. I did not run the HIP build or other card sizes. Workaround on 0.2.11 without a rebuild: `"env": {"FNX_PF_ROWS": "4096", "FNX_PF_PASS": "4"}` in the run config. With this workaround the engine also starts with `--batch 3`, `5` and `8` on the same cards (free VRAM on GPU 0 after load 276 / 254 / 252 MiB, no further experts moved to RAM); a full test pass with `--batch 5` ran without errors. ### Smallest steps or command that reproduce it 1. Build v0.2.11 with `-DSTRATA_BUILD_SPLIT=ON -DSTRATA_SPLIT_CARDS="2;3" -DSTRATA_SPLIT_ARCH=86`. 2. Start the split engine on 3x RTX 3090 24 GB (Linux, `LimitMEMLOCK=infinity`) with the IQ3_S set, context 65536, `--spec 6 --lookup 15 --batch 1 --vision`, no `FNX_*` variables except `STRATA_NO_ARENA_THP=1`: ```text strata-split-3 --serve --native Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --mtp <mtp dir> --draft-vocab data/draft_vocab_en.bin --max-context 65536 --spec 6 --lookup 15 --conversation-cache-mib 4096 --batch 1 --vision --layer-split auto ``` ### Reproduction status Reproduced locally ### Strata version Strata v0.2.11 (c3b3f503), engine 0.1.57, source build (CUDA 13.2, sm_86, `-DSTRATA_NATIVE_EXPERTS=ON`), HOSTRING (no peer access) ### Graphics card, memory and system - 4x NVIDIA GeForce RTX 3090 24 GB (driver 595.99.02): GPU 0-2 for the engine (PCIe 3.0 x8 / x8 / x16, same NUMA node, power limit 350/370/350 W), GPU 3 drives the desktop (x16, other NUMA node) - 2x Xeon E5-2696 v4 (44 cores / 88 threads, 2 NUMA nodes, no AVX-512), 503 GiB RAM, model on NVMe (ZFS mirror) - Ubuntu 26.04.1, kernel 6.17.0-29 ### Model, size and settings - Model: SC117/Qwen3.8-Flash-Next-GSQ-RCO-abliterated-GGUF IQ3_S (2 files), MTP layer from Strata's `mtp/rt`, mmproj BF16 - Context 65536, 1 slot, MTP `--spec 6 --lookup 15`, conversation cache 4096 MiB, defaults otherwise (arena on, coldest 3 GiB of experts in RAM) ### Logs Local directories are replaced by placeholders (`<strata>` = the Strata checkout, `<data>` = the model data directory, `<report>` = the output folder). <details><summary>engine-log-T1-stock.txt (v0.2.11 as released: fails)</summary> ```text strata-vision: model files loaded in 2.0 s strata-vision: warmed up at 1024 image tokens in 0.7 s [strata] 2026-11-07 10:59:51 engine started: <strata>/build/strata-split-3 --serve --native Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --mtp <data>/mtp/rt --draft-vocab <strata>/data/draft_vocab_en.bin --max-context 65536 --spec 6 --lookup 15 --conversation-cache-mib 4096 --batch 1 --vision --layer-split auto gguf: 676 dense/small tensors converted to Q8_0/F32 at load (the file's routed experts keep their types) fnx: token_embd.weight and per_layer_token_embd.weight (29.5 GB) locked in RAM in 3.1 s fnx: 1460 of 24576 routed experts (3.0 GiB) in RAM, ranked by <strata>/src/split/data/expert-routes.bin fnx: weights read in 14.0 s of reading (49.1 GB from the disk at 3.52 GB/s, 0.0 GB from the page cache), placed in 43.6 s fnx: draft layer experts q2_0 fnx: HOSTRING build: the cards exchange through page-locked host memory; peer access is never enabled, no peer probe, IOMMU and BAR1 checks skipped fnx: VRAM short by 1794 MiB on a card (another process on it?): 3117 more of the coldest experts to RAM fnx: 4577 of 24576 routed experts (9.2 GiB) in RAM, ranked by <strata>/src/split/data/expert-routes.bin (3117 of them because VRAM was short) sfnx: failed: card 0: expert cache: pool 3 has 271 slots, a window needs 320 (fewer experts in RAM) ``` </details> <details><summary>engine-log-T2-workaround.txt (FNX_PF_ROWS=4096 FNX_PF_PASS=4: loads)</summary> ```text strata-vision: model files loaded in 1.9 s strata-vision: warmed up at 1024 image tokens in 0.7 s [strata] 2026-11-07 11:02:43 engine started: <strata>/build/strata-split-3 --serve --native Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --mtp <data>/mtp/rt --draft-vocab <strata>/data/draft_vocab_en.bin --max-context 65536 --spec 6 --lookup 15 --conversation-cache-mib 4096 --batch 1 --vision --layer-split auto gguf: 676 dense/small tensors converted to Q8_0/F32 at load (the file's routed experts keep their types) fnx: token_embd.weight and per_layer_token_embd.weight (29.5 GB) locked in RAM in 3.0 s fnx: 1460 of 24576 routed experts (3.0 GiB) in RAM, ranked by <strata>/src/split/data/expert-routes.bin fnx: weights read in 12.8 s of reading (49.1 GB from the disk at 3.85 GB/s, 0.0 GB from the page cache), placed in 43.7 s fnx: draft layer experts q2_0 fnx: HOSTRING build: the cards exchange through page-locked host memory; peer access is never enabled, no peer probe, IOMMU and BAR1 checks skipped fnx: arena: card 0: 548 MiB free after its arena fnx: arena: card 1: 601 MiB free after its arena fnx: arena: card 2: 3067 MiB free after its arena fnx: arena: the K/V pool's own 600 pages (115200 positions), up to 5897 (1132224 positions) by lending the slots of 9860 x 0.66 MiB (6.3 GiB), 9860 x 0.66 MiB (6.3 GiB), 9860 x 0.56 MiB (5.4 GiB) fnx: warm: prompt path (1100 tokens) ... fnx: warm: prompt path done fnx: warm: verify windows ... fnx: warm: verify 1 rows done fnx: warm: verify 16 rows done sfnx: loaded in 133.2 s, context 65536, MTP K=6, lookup 15, 1 slot(s); 3 cards, sums between them fp16; K/V pool (int8) 1132224 positions free; VRAM free 318 / 371 / 2837 MiB ``` </details> <details><summary>engine-log-T3-patched.txt (patch below, no FNX_PF_*: loads)</summary> ```text strata-vision: model files loaded in 1.8 s strata-vision: warmed up at 1024 image tokens in 0.6 s [strata] 2026-11-07 11:05:32 engine started: <strata>/build/src/split/strata-split-3 --serve --native Qwen3.8-Flash-Next-GSQ-RCO-abliterated-IQ3_S-00001-of-00002.gguf --mtp <data>/mtp/rt --draft-vocab <strata>/data/draft_vocab_en.bin --max-context 65536 --spec 6 --lookup 15 --conversation-cache-mib 4096 --batch 1 --vision --layer-split auto gguf: 676 dense/small tensors converted to Q8_0/F32 at load (the file's routed experts keep their types) fnx: token_embd.weight and per_layer_token_embd.weight (29.5 GB) locked in RAM in 3.6 s fnx: 1460 of 24576 routed experts (3.0 GiB) in RAM, ranked by <strata>/src/split/data/expert-routes.bin fnx: weights read in 15.8 s of reading (49.1 GB from the disk at 3.11 GB/s, 0.0 GB from the page cache), placed in 48.4 s fnx: draft layer experts q2_0 fnx: prompt path: 4096 rows, 2 chunks a pass (the cards hold 3904 MiB free after the weights, the K/V pool 609 MiB) fnx: HOSTRING build: the cards exchange through page-locked host memory; peer access is never enabled, no peer probe, IOMMU and BAR1 checks skipped fnx: arena: card 0: 1028 MiB free after its arena fnx: arena: card 1: 1081 MiB free after its arena fnx: arena: card 2: 3547 MiB free after its arena fnx: arena: the K/V pool's own 600 pages (115200 positions), up to 5897 (1132224 positions) by lending the slots of 9860 x 0.66 MiB (6.3 GiB), 9860 x 0.66 MiB (6.3 GiB), 9860 x 0.56 MiB (5.4 GiB) fnx: warm: prompt path (1100 tokens) ... fnx: warm: prompt path done fnx: warm: verify windows ... fnx: warm: verify 1 rows done fnx: warm: verify 16 rows done sfnx: loaded in 141.4 s, context 65536, MTP K=6, lookup 15, 1 slot(s); 3 cards, sums between them fp16; K/V pool (int8) 1132224 positions free; VRAM free 798 / 851 / 3317 MiB ``` </details> <details><summary>run_tests.sh (the test script; local directories replaced by placeholders)</summary> ```bash #!/bin/bash # Strata 0.2.11, split engine (sFNX, strata-split-3) on 3x RTX 3090 24 GB + a 4th RTX 3090 that drives the desktop. # T1 v0.2.11 as released, no FNX_PF_* set -> expected: start fails (prompt-path auto pick 8192 x 4, VRAM short, expert cache pool error) # T2 v0.2.11 + FNX_PF_ROWS=4096 FNX_PF_PASS=4 -> workaround: loads # T3 v0.2.11 + patch (arena slots counted), no env -> loads by itself # T4/T5 tools/strata_bench.py (3 runs, --long) on the T2 and T3 configurations, vision encoder on the 4th card (vision.cuda_device=3) # Needs: LimitMEMLOCK=infinity (systemd-run --user -p LimitMEMLOCK=infinity ...), nothing else on GPU 0-2. set -u OUT=<report>; CFG=$OUT/configs; PY=python3; cd <strata> echo "memlock: $(ulimit -l)" start_until_loaded() { # $1 name, $2 config local log; log=$($PY -c "import json,sys;print(json.load(open(sys.argv[1]))['log'])" "$2"); rm -f "$log" echo "== $1 $(date '+%F %T')" $PY serve/server.py --engine strata --config "$2" --port 8080 > "$OUT/$1-server.txt" 2>&1 & local pid=$! for i in $(seq 1 120); do sleep 5; grep -qE "sfnx: (loaded|failed)|out of memory|Traceback" "$log" 2>/dev/null && break; kill -0 $pid 2>/dev/null || break; done sleep 3; cp "$log" "$OUT/$1-engine.log" grep -E "VRAM short|in RAM|prompt path|arena: card|sfnx:" "$log" | grep -v "slot 0:" nvidia-smi --query-gpu=index,memory.used --format=csv,noheader | tr '\n' ' '; echo kill $pid; wait $pid 2>/dev/null; sleep 5 pkill -x strata-split-3; pkill -x strata-vision; sleep 5 } [ "${SKIP_T1:-0}" = 1 ] || start_until_loaded T1-stock $CFG/t1-stock.json start_until_loaded T2-workaround $CFG/t2-workaround.json start_until_loaded T3-patched $CFG/t3-patched.json for t in T2-workaround:t2-workaround T3-patched:t3-patched; do n=${t%%:*}; c=${t##*:}; echo "== bench $n $(date '+%F %T')" $PY tools/strata_bench.py --config $CFG/$c.json --runs 3 --long --out $OUT/bench-$n --ready-timeout 900 > $OUT/bench-$n.txt 2>&1 tail -25 $OUT/bench-$n.txt pkill -x strata-split-3; pkill -x strata-vision; sleep 5 done echo "FERTIG $(date '+%F %T')" ``` </details> Related: #5187 and #5258 (per-pool floor; same pool-3 error, different trigger: 16 GB cards with most experts in RAM), #5440 (staging threshold). A community benchmark of the same setup (split engine on 3x RTX 3090, `--batch 1/3/5/8`, full test pass) follows as a results-only PR.
Author
Owner

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

Retested on v0.2.12 (engine 0.1.58), same hardware and model, --batch 5, 64K context, no FNX_PF_* set.

20885f7a / a7cc8faa (per-pool window floor, ported from #5158) fix the crash: the engine now starts. The cause described above is still there, though. The prompt-path pick still counts the arena pool's not-yet-allocated slots as free, picks 8192 x 4, and the shortfall now pushes extra experts to RAM instead of failing:

fnx: VRAM short by 1981 MiB on a card (another process on it?): 3400 more of the coldest experts to RAM
fnx: 4860 of 24576 routed experts (9.8 GiB) in RAM, ranked by .../expert-routes.bin (3400 of them because VRAM was short)

Measured with the same requests (streamed, single client):

v0.2.12, no FNX_PF_* v0.2.12 + FNX_PF_ROWS=4096 FNX_PF_PASS=4 v0.2.12 + patch, no FNX_PF_*
prompt path 8192 x 4 (auto) 4096 x 4 (by hand) 4096 x 2 (auto)
routed experts in RAM 4860 (9.8 GiB) 1460 (3.0 GiB) 1460 (3.0 GiB)
first token, 908-token prompt 10.5 s 1.95 s 2.04 s
first token, 49.7K-token prompt 29.1 s 27.1 s 29.9 s
decode tok/s, 908 / 49.7K-token prompt 218 / 141 212 / 222 218 / 214

So short prompts, which is most agent turns, wait about 5x longer. The 7-line patch attached to this issue (subtract the arena pool's slots from the free VRAM before the pick) applies unchanged to v0.2.12 and is complementary to the residency floor. Rebuilt with it, the engine picks the prompt path on its own (fnx: prompt path: 4096 rows, 2 chunks a pass (the cards hold 3904 MiB free after the weights, the K/V pool 796 MiB)), nothing goes short, and it keeps 3.0 GiB of experts in RAM. Its pick is one step more cautious than the hand-set 4096 x 4 (long prompts read ~10% slower), which seems the right side to err on.

<!-- gh-comment-id:6711508368 --> @chaerle commented on GitHub (Nov 7, 2026): Retested on v0.2.12 (engine 0.1.58), same hardware and model, `--batch 5`, 64K context, no `FNX_PF_*` set. 20885f7a / a7cc8faa (per-pool window floor, ported from #5158) fix the crash: the engine now starts. The cause described above is still there, though. The prompt-path pick still counts the arena pool's not-yet-allocated slots as free, picks 8192 x 4, and the shortfall now pushes extra experts to RAM instead of failing: ``` fnx: VRAM short by 1981 MiB on a card (another process on it?): 3400 more of the coldest experts to RAM fnx: 4860 of 24576 routed experts (9.8 GiB) in RAM, ranked by .../expert-routes.bin (3400 of them because VRAM was short) ``` Measured with the same requests (streamed, single client): | | v0.2.12, no `FNX_PF_*` | v0.2.12 + `FNX_PF_ROWS=4096 FNX_PF_PASS=4` | v0.2.12 + patch, no `FNX_PF_*` | |---|---|---|---| | prompt path | 8192 x 4 (auto) | 4096 x 4 (by hand) | 4096 x 2 (auto) | | routed experts in RAM | 4860 (9.8 GiB) | 1460 (3.0 GiB) | 1460 (3.0 GiB) | | first token, 908-token prompt | 10.5 s | 1.95 s | 2.04 s | | first token, 49.7K-token prompt | 29.1 s | 27.1 s | 29.9 s | | decode tok/s, 908 / 49.7K-token prompt | 218 / 141 | 212 / 222 | 218 / 214 | So short prompts, which is most agent turns, wait about 5x longer. The 7-line patch attached to this issue (subtract the arena pool's slots from the free VRAM before the pick) applies unchanged to v0.2.12 and is complementary to the residency floor. Rebuilt with it, the engine picks the prompt path on its own (`fnx: prompt path: 4096 rows, 2 chunks a pass (the cards hold 3904 MiB free after the weights, the K/V pool 796 MiB)`), nothing goes short, and it keeps 3.0 GiB of experts in RAM. Its pick is one step more cautious than the hand-set 4096 x 4 (long prompts read ~10% slower), which seems the right side to err on.
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#5465
No description provided.