Skip to content

[Engine] 0.1.66 is 18% slower than 0.1.62 on an 8 GB Blackwell card: expert-cache auto-sizing holds 562 vs 886 experts (602 vs 256 MiB post-cache headroom) #6836

Open

Description

@davidvv

Area

[Engine] — speed, kernels, models, the server and API

Desktop app, Terminal or source?

Source (a source tree, started with serve/server.py --engine strata --config <run config>.json)

What happened

Engine 0.1.66 — the cuda13 build shipped with v0.2.20, the one carrying the Blackwell sm_120 speedups — decodes 18 % slower than 0.1.62 on an 8 GB Blackwell laptop GPU, on the same model with the same config. I expected an update advertised as a Blackwell speedup to be at least as fast.

Cause, visible in the startup log: 0.1.66 reserves about 602 MiB of "post-cache" VRAM headroom where 0.1.62 reserved about 256 MiB. On an 8 GB card that cuts resident experts from 886 to 562 (−36.6 %), and decode tracks residency.

0.1.62: expert cache auto: 1.96 GiB free, 300 MiB reserved (+218 MiB for the draft head, +256 MiB for what is allocated after the cache) -> 855 slots
        expert cache 886 slots, 1.20 GiB of VRAM
        336 MiB of VRAM free with everything loaded

0.1.66: expert cache auto: 1.71 GiB free, 300 MiB reserved (+218 MiB for the draft head, +384 MiB for what is allocated after the cache) -> 617 slots
        only 902 MiB free once the slots are written (need 902 MiB: reserve 300 MiB + 602 MiB post-cache); shrinking the expert cache
        expert cache 562 slots, 0.77 GiB of VRAM
        740 MiB of VRAM free with everything loaded

Measured, single-variable A/B (same server code 0.2.16, same model, same arguments, only strata.exe swapped; three short coding controls plus one fresh ~120 K-token retrieval, temperature 0, seed 42, unique nonce per run):

engine expert slots VRAM free control decode 120K retrieval decode retrieval prefill
0.1.62 886 336 MiB 72.6 t/s 64.3 t/s 969 tok/s
0.1.66 562 740 MiB 59.3 t/s (−18.3 %) 55.2 t/s (−14.2 %) 953 tok/s (−1.7 %)

Prefill is unchanged. The whole regression is decode, and it tracks the expert-residency drop.

Forcing the experts back does not help. --expert-cache 886 produces 918 slots but leaves only 250 MiB free, and the engine warns:

250 MiB of VRAM free with everything loaded - LOW: requests may stall; add --vram-reserve-mib 562 to the config's args (or lower --max-context)
the expert cache was set with --expert-cache (918 slots): ... decode can be several times slower with the card this full

Measured decode at that setting is 42.7 t/s — below 0.1.66's own auto (59.3 t/s) and far below 0.1.62 (72.6 t/s). So 0.1.66 genuinely needs the extra headroom; it is not choosing fewer experts needlessly.

Tuning does not close the gap either. Following the --vram-reserve-mib behaviour reported in #4781 and #6128, I tried 0.1.66 with --vram-reserve-mib 100 (everything else identical). It does buy slots:

0.1.66: expert cache auto: 1.71 GiB free, 100 MiB reserved (+218 MiB for the draft head, +384 MiB for what is allocated after the cache) -> 762 slots
        only 702 MiB free once the slots are written (need 702 MiB: reserve 100 MiB + 602 MiB post-cache); shrinking the expert cache
        expert cache 706 slots, 0.96 GiB of VRAM
        542 MiB of VRAM free with everything loaded

That is 706 slots instead of 562, but decode only moves from 59.3 to 60.0 t/s (control average; retrieval decode 61.3, prefill improves to 1004 tok/s). Still about 17 % under 0.1.62. So the reserve is not the whole story either — even tuned, 0.1.66 stays well below 0.1.62 on this card.

Full picture on one 8 GB Blackwell card, same model, same pack, same profile:

engine reserve slots VRAM free control decode retrieval decode retrieval prefill
0.1.62 300 886 336 MiB 72.6 t/s 64.3 t/s 969 tok/s
0.1.66 300 562 740 MiB 59.3 t/s 55.2 t/s 953 tok/s
0.1.66 100 706 542 MiB 60.0 t/s 61.3 t/s 1004 tok/s
0.1.66 300, --expert-cache 886 918 250 MiB 42.7 t/s — —

On a card with more VRAM this would be invisible. On 8 GB the headroom-accounting change dominates the kernel speedups, so the update makes real Blackwell hardware slower, and no combination of --expert-cache / --vram-reserve-mib I have found recovers 0.1.62's speed.

Question: is the 256 → 602 MiB post-cache reservation intended? If it is, can it be scaled down on small cards, or exposed as a flag? Otherwise please document that 0.1.66 needs more VRAM headroom and regresses cards under roughly 12 GB, so users on those cards know to stay on 0.1.62.

Related issues

I searched first. This is the same general area as several open reports about WDDM expert-cache auto-sizing, but the numbers and the mechanism here are different, so I am filing it separately rather than adding to a thread about a different cause:

If a maintainer thinks this belongs in one of those threads, say which and I will repost the numbers there.

Smallest steps or command that reproduce it

Both runs use the same Strata 0.2.16 tree and server.py, the same IQ2_XS model, and the same engine arguments; only the engine binary differs.

  1. Serve with engine 0.1.62 and: --expert-cache auto --prefill auto --vram-reserve-mib 300 --max-context 131072 --kv q4_0 --kv-resident 0 --pool-workers 15 --spec 6 --draft dflash2.
  2. Read GET /metrics: expert_slots 886, vram_free_mib 336. Three short controls average 72.6 t/s decode.
  3. Swap only the engine to strata-engine 0.1.66 cuda13 from v0.2.20, keeping every argument identical.
  4. Read /metrics again: expert_slots 562, vram_free_mib 740. Controls average 59.3 t/s.
  5. Optional confirmation: set --expert-cache 886. The log then says expert cache 918 slots and 250 MiB of VRAM free with everything loaded - LOW, and decode falls to 42.7 t/s.

No benchmark is needed to see it: the expert cache auto ... post-cache lines in the startup log already show 256 MiB (0.1.62) against 602 MiB (0.1.66).

Reproduction status

Reproduced locally.

Strata version

Strata 0.2.16 server · engine 0.1.62 vs engine 0.1.66 from v0.2.20

Graphics card, memory and system

NVIDIA RTX PRO 1000 Blackwell Generation Laptop GPU, 8 GB · 64 GB RAM · Windows 11

Model, size and settings

Qwen3.8-Flash-Next IQ2_XS · 131072 context · pictures off · --kv q4_0 · --kv-resident 0 · --spec 6 · --draft dflash2

Logs

Startup lines from both engines (strata-iq2_xs.log for 0.1.62, strata-iq2_xs-e0166.log for 0.1.66):

[strata] 0.1.62 engine started: ... --expert-cache auto --prefill auto --vram-reserve-mib 300 --max-context 131072 --kv q4_0 --pool-workers 15 --kv-resident 0 ...
strata generate: expert cache auto: 1.96 GiB free, 300 MiB reserved (+218 MiB for the draft head, +256 MiB for what is allocated after the cache) -> 855 slots
strata generate: expert cache 886 slots, 1.20 GiB of VRAM; policy is
strata generate: pre-filled 886 of 886 slots from the profile in 0.1 s (22510 MB/s); slot 0 verified
strata generate: token graph hit path: 886 resident experts, decided on the device
strata serve: 336 MiB of VRAM free with everything loaded

[strata] 0.1.66 engine started: ... --expert-cache auto --prefill auto --vram-reserve-mib 300 --max-context 131072 --kv q4_0 --pool-workers 15 --kv-resident 0 ...
strata generate: NVIDIA (8.0 GiB): --prefill auto stays at 8192 so prompt loans do not cannibalize hot expert slots (#5199; STRATA_NV_CHUNK=16 or 1 raises it)
strata generate: expert cache auto: 1.71 GiB free, 300 MiB reserved (+218 MiB for the draft head, +384 MiB for what is allocated after the cache) -> 617 slots
strata generate: only 902 MiB free once the slots are written (need 902 MiB: reserve 300 MiB + 602 MiB post-cache); shrinking the expert cache
strata generate: expert cache 562 slots, 0.77 GiB of VRAM; policy is
strata generate: pre-filled 562 of 562 slots from the profile in 0.0 s (18578 MB/s); slot 0 verified
strata generate: token graph hit path: 562 resident experts, decided on the device
strata serve: tiny expert cache (562 of 24576 slots, 2.3%): dampening adaptive swaps 96 -> 16 to avoid PCIe thrashing (--adapt-swaps N overrides)
strata serve: 740 MiB of VRAM free with everything loaded

[strata] 0.1.66 engine started: ... --expert-cache 886 ...
strata generate: expert cache 918 slots, 1.25 GiB of VRAM; policy is
strata serve: 250 MiB of VRAM free with everything loaded - LOW: requests may stall; add --vram-reserve-mib 562 to the config's args (or lower --max-context)

Benchmark tool and the raw JSON results are available on request; the protocol matches the 131k-q4-production-120k-retrieval benchmark.

Activity

  1. real4root commented on Nov 23, 2026

    @real4root

    Same result here, on 2× 12 GB cards (RTX 4070 + RTX 3080 Ti, layer split, Windows WDDM, driver 617.42, UD-Q4_K_XL, MTP, --kv int8). Here the cause is not fewer slots: 0.1.63 and 0.1.66 hold more experts than older engines, and decode is still much slower.

    Same Control, same model/pack/profile, only exe changed. Env STRATA_ARENA_PIN_GIB=0 STRATA_ROUTE_TAIL_SKIP=7 on all rows. 0.1.66 also needs STRATA_HC_Q8_TC=0 STRATA_HC_Q8_BF16TC=0 to run at all (#6704).

    engine expert slots (both cards) decode cache hit standard-v1 decode short / 4K / 16K prompt 16K
    0.1.52 1662 93–95% 79.7 / 70.1 / 73.5 t/s 923 t/s
    0.1.63 2358 50–79% 40.0 / 46.0 / 46.9 t/s (best tuning) 1028 t/s
    0.1.66 ~3620 56–64% 38.7 / 39.9 / 40.5 t/s 1093 t/s

    0.1.66 decode is −43…−51% vs 0.1.52 and −3…−14% vs 0.1.63, with 2.2× the slots of 0.1.52. Prefill is better on 0.1.66. In the 0.1.66 log, the prompt path borrows 1348 of 1513 slots on the second card, and "tiny expert cache" dampening (96 → 32 swaps) kicks in. My guess is that the hot set is not refilled after a prompt loan.

  2. semsmumi commented on Nov 23, 2026

    @semsmumi

    Same shape on an 8 GB Ampere card (sm_86, RTX 3070, Windows 11 WDDM, CLI install), paired A/B in one
    session, 4 × 256-token decodes + a 2 731-token needle:

    engine --expert-cache experts held decode median prefill needle
    0.1.65 auto 846 (1.15 GiB) 39.0 tok/s 420 tok/s 757 tok/s
    0.1.66 auto 552 (0.75 GiB) 40.3 tok/s 278 tok/s 268 tok/s
    0.1.66 pinned 846 877 (1.19 GiB) 42.5 tok/s 421 tok/s 758 tok/s

    552 vs 846 here against your 562 vs 886 — very close, so it looks like the same auto shrink rather than a
    Blackwell-specific thing. I did not see a decode regression at equal cache (+8 % for 0.1.66), which
    matches the comment above that the slot count alone does not explain everything on every card. Pinning the
    cache (--expert-cache 846) is the workaround that restores the old numbers on my box.
    Full paired table and the engine's cache-hit lines are in #6846.

  3. added a commit that references this issue on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions