mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3781] [Engine] 0.1.47 default CPU expert-pool collapses to 1 worker on a many-sockets-1-core guest (VMware/ESXi NUMA pin): -24%/-40% decode vs 0.1.45 on a 125B MoE; fixed by --pool-workers 23 #1593
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#1593
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 @oven1231231234 on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3781
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (setup.sh or a build)
What happened
Upgrading the serving engine from 0.1.45 to 0.1.47 (Strata 0.2.2) on the same guest, same model, same weights, same serve args, dropped decode throughput by ~24% (narrative) / ~40% (code) with the default configuration. Root cause: the new default CPU expert-pool sizing in
plan_pool_workers()reads the guest's first "socket" core count as the pool bound, and this guest presents 24 sockets × 1 core each (a topology produced by ESXi NUMA pinning withcpuid.coresPerSocket="1"). The result isn = max(1, 1-1) = 1→ 1 pool worker instead of 23.The startup log says it directly. 0.1.47 default (the regression):
vs the same guest under 0.1.45 (the old default):
So the 0.1.45 default gave 23 workers on this box; the 0.1.47 default gives 1. On a 125B MoE where ~15–18% of expert rows miss the VRAM expert cache and fall to the CPU pool over PCIe, 23 parallel workers vs 1 serial worker is the entire decode delta.
Code path (0.1.47,
include/strata/kernels/cpu/pool_plan.hpp):With
cores_per_package = {1,1,...,1}(24 entries),local = 1, son = max(1, 0) = 1. The bound that exists to protect a real dual-socket Xeon from cross-socket expert reads has no such penalty on a single-NUMA-node guest (NUMA node(s): 1, all 24 CPUs in node0), but the code cannot tell the difference because the guest reports 24 sockets.Smallest steps or command that reproduce it
Run Strata 0.1.47 (0.2.2) on a guest whose
lscpureportsCore(s) per socket: 1andSocket(s): N(N > 1) with a single NUMA node. On this host that topology comes from ESXi NUMA pinning:numa.nodeAffinity+cpuid.coresPerSocket="1"+numa.autosize.vcpu.maxPerVirtualNode="24".Serve any MoE model with experts that spill to the CPU pool (expert-cache
auto, large enough model that VRAM slots are not 100%). Start the engine and read the startup block: it will print1 workers by default ... bounded by the host's CPU socket.Decode throughput is ~24% (narrative) / ~40% (code) below the same model on 0.1.45, which prints
23 pool workersby default on the identical guest.Add
--pool-workers 23to the serve args (or the configargs). The startup block changes to23 pool workers on logical processors 1..23and decode recovers to the 0.1.45 level or above.Reproduction status
Reproduced locally
Strata version
Strata 0.2.2 · engine 0.1.47 (commit
e6fff4ad, locally built with the sm_86/CUDA-13 production build fingerprint:Q6K_EXPERTS=ON,MMQ_KQUANTS=ON, arch 86,NATIVE_EXPERTS=ON). Compared against engine 0.1.45 (production, same build flags). Build provenance viastrings engine/strata | grep '0.1.'+engine/BUILD.json+/v1/status. Driver 580.178.04 and kernel 6.8.0-136-generic are identical for both versions — the regression is engine-only.Graphics card, memory and system
nvidia-smi -pl 350; default 375 W) — draw stayed ≤147 W across all runs, so no power throttling.numa.nodeAffinity+cpuid.coresPerSocket="1"+numa.autosize.vcpu.maxPerVirtualNode="24").Model, size and settings
Exact serve flags (from the engine startup line in the serve log, identical across all arms except the pool/env delta under test):
Qwen3.8-Flash-Next IQ3_S (125B MoE, 2-shard GGUF) · 262K context · no vision ·
--kv int8 --kv-resident 32768(int8 KV, 32768-token resident) ·--expert-cache auto(8612 VRAM expert-cache slots) ·--spec 4 --spec-min-p 0.5 --mtp(MTP draft-4 speculative) ·presence_penaltypinned 0.Logs
Engine startup line from the serve log (0.1.47 default config, the regressed state):
With
--pool-workers 23added:Numbers (6-arm matrix; arms B–F are the same 0.1.47 binary; B–F heat-soaked 40→56 °C; 3 warmups + 5 runs per prompt, + prefill probe; arm A re-measured hot after arm B for fair comparison)
SM86_PERF=0), overlap ON, pool 23--pool-workers 23)The two clean single-variable pairs (everything held constant within a pair):
In both overlap states, pool 23 recovers ~+40% narrative / ~+76% code decode; overlap contributes no additional decode on top of pool width here. Arm F (0.1.47 +
--pool-workers 23, no env vars) matches or beats the 0.1.45 production arm A on decode (110.3/119.9 vs 102.95/110.86) and prefill-10k (1282 vs hot 1271.6; prefill-90k 1891 vs 1896).Measurement method
scripts/bench.shwrapper driving the running engine over HTTP/v1/chat/completions(streaming). Protocol: 3 warmups + 5 measured runs per prompt (narrative + code), canonical two-depth prefill probe (10k and 90k prompt tokens).decode_TPS = completion_tokens / (wall_time − TTFT)(prefill excluded);prefill tok/s = prompt_tokens / TTFT.enable_thinking:false, temp 0.6 / top_p 0.95 / top_k 20 / min_p 0.0. Output length is natural (model-decided, ~600–1000 tok/run).Also observed: the sm_86 auto-stack and adaptive overlap are mutually exclusive, and 0.1.47 overlap ON costs prefill here
A second, independent default in 0.1.47:
src/core/nv_defaults.cppapply_nv_defaults()(called atsrc/program/generate.cpp:2813, before the overlap decision) auto-injects 9 switches on sm_86 viasetenv(name, value, 0)(line 59), two of which areSTRATA_ADAPT_NOWAIT=1andSTRATA_ADAPT_LAG=2(lines 26–27). The overlap guard (generate.cpp:9962) isadapt_lag() != 1 || adapt_nowait(), so with the injected values adaptive overlap is force-off even if the user setsSTRATA_ADAPT_OVERLAP=1.Because
setenv(overwrite=0)keeps user-set values, the only way to get overlap ON on sm_86 is to also presetSTRATA_ADAPT_NOWAIT=0 STRATA_ADAPT_LAG=1, which removes those two from the printed stack (banner drops from 9 to 7 switches). So "full 9-switch stack" and "overlap ON" cannot both hold — there is noSTRATA_SM86_PERF-free path to both.Within 0.1.47, the overlap-ON arms (C/D/E, 1174–1204 tok/s) all sit ~6–7% below the overlap-OFF arms (B 1269 / F 1282) on prefill-10k, whereas on 0.1.45 the overlap-ON production arm A reaches 1287.8. I flag this only as observed, not as a cleanly isolated effect: the F↔D comparison that would isolate overlap holds pool at 23 but the stack differs (9 vs 7, because overlap ON requires dropping NOWAIT/LAG), so the stack change confounds the overlap effect. It does mean "just add
STRATA_ADAPT_OVERLAP=1after upgrading" does not help this workload and costs prefill.What I would like
The socket-bound default is correct for a real multi-socket server, but a single-NUMA-node guest that reports N sockets × 1 core (VMware/ESXi NUMA pinning) has no cross-socket penalty to protect against, and the default silently collapses to 1 worker. Possible directions, whatever is cleanest:
--pool-workersby hand — the startup linebounded by the host's CPU socketis the only breadcrumb.--pool-workers 23is a complete workaround (verified, arm F), so this is not blocking for me, but the default regression on this common-ish guest topology is worth a look.Cross-references: #3708 (NUMA pool split on a two-socket Xeon — the feature behind the socket-bound sizing), #3262 (hybrid CPU core counting in
plan_pool_workers), #2936 (0.1.43→0.1.44 adaptive-overlap default flip, closed as not-planned — the overlap piece here is a follow-on of that line of changes).@github-actions[bot] commented on GitHub (Oct 23, 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:
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
@github-actions[bot] commented on GitHub (Oct 23, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.