mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3262] [Engine] Linux hybrid CPU: LP-E cores (cpu_lowpower) counted as P-cores, and 0.2.0's 15-worker default is ~35 % slower than 9 on a Core Ultra 7 255H #1323
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#1323
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 @faf-net on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3262
Problem and result
On an Intel Core Ultra 7 255H (Arrow Lake-H: 6 P + 8 E + 2 LP-E, no SMT) under Linux, Strata's pool planning has two effects I could measure:
pool.cpp(Linux branch) decides P/E from Intel's hybrid PMU lists/sys/devices/cpu_core/cpusand/sys/devices/cpu_atom/cpus. On Meteor Lake / Arrow Lake-H the LP-E cores are in a third list,/sys/devices/cpu_lowpower/cpus, sois_e()returns false for them. They sort after the real P-cores (lower capacity) but before every E-core, and get workers early: with--pool-workers 9the engine reports9 pool workers on logical processors 1,2,3,4,5,14,15,6,7.--pool-affinity measure(0.1.45) reported "8 P-cores / 8 threads, 8 E-cores".bench.pyruns, same model and settings otherwise):hip-rx7900(0.1.45.3)--pool-workers 9hip-rx7900(0.1.45.3)1,2,3,4,5,14,15,6,...,13)This matches an earlier sweep on 0.1.44.1 (IQ2_XS, long answer, median of 3): automatic 56.1, 5 workers 76.6, 9 workers 76.8, 13 workers 74.0 tok/s.
Topology (sysfs, kernel 6.18.15)
What the LP-E cores cost (A/B, 0.1.44.1)
Same engine and config (IQ3_XXS, MTP,
--pool-workers 9), container limited with--cpuset-cpus 0-13(B) or not (A). Three interleaved pairs, each a fresh engine, one warm-up answer, then two measured answers of 900 tokens:Decode is unchanged; short prompts are read about 40 % faster without the LP-E cores (first token for a short chat turn about 0.95 s → 0.67 s). Longer prompts were not part of this A/B.
Suggested change (not tested as a patch)
Read
/sys/devices/cpu_lowpower/cpusbesidecpu_coreandcpu_atom, treat those CPUs as the lowest tier (after E-cores, or excluded by default), and keep the capacity fallback (cap * 10 < max_cap * 9) for CPUs that are in no list. For the default worker count on a hybrid CPU, this box suggests "P-cores + a few E-cores" rather than "every physical core". I can build and measure a patch on this machine (HIP only; I cannot build CUDA or SYCL here).Validation
Passed: sysfs reads above; A/B with
--cpuset-cpus(folgetests.py cpu, raw JSON lines); 0.2.0 prebuilt engine with and without--pool-workers 9(bench.py --tests schreiben); placement lines copied from the engine log.Failed: none.
Not run: a patched engine; Windows (the Windows branch has its own detection); other Meteor/Arrow/Lunar Lake CPUs; more than one run per configuration for the 0.2.0 worker comparison.
Machine: UGREEN iDX6011 Pro NAS, Core Ultra 7 255H, 64 GB LPDDR5X, RX 7900 XTX over OCuLink x4, UGOS Pro 1.19 (Debian 12 base), ROCm 7.10 (TheRock), model Qwen3.8-Flash-Next IQ3_XXS. Benchmark report: #2904. Scripts: https://github.com/faf-net/ugreen-idx6011-egpu-llm
@Niko1221 commented on GitHub (Oct 20, 2026):
Thanks for the careful measurement. The cause was ours: your Core Ultra 7 255H lists its LP-E cores in /sys/devices/cpu_lowpower/cpus, and the engine only knew the cpu_atom and cpu_core lists, so it counted them as P-cores and planned 15 workers. 0.2.1 counts the cpu_lowpower cores as efficiency cores in the engine and in setup; your CPU should now plan 10 workers. We have no such CPU and tested the plan with unit tests and a fake /sys, so please check the worker count in the start-up log and your tok/s on 0.2.1.
This is in Strata 0.2.1: https://github.com/Niko1221/Strata/releases/tag/v0.2.1
@faf-net commented on GitHub (Oct 20, 2026):
Checked on 0.2.1: the fix works on the real CPU (Core Ultra 7 255H, 6 P + 8 E + 2 LP-E, no SMT; Linux 6.18.15). Prebuilt engine 0.1.46
hip-rx7900with control 0.1.46.2, single RX 7900 XTX, the same model and settings as in my first report (IQ3_XXS native pack, MTPrt,--max-context 262144 --kv int8 --spec 4).Start-up log without
--pool-workers:The LP-E cores 14 and 15 are no longer used for workers, also with a fixed count: with
--pool-workers 90.2.1 takes CPUs 1-9, where 0.2.0 took1,2,3,4,5,14,15,6,7. Setup plans the same 10: therocm-gfx110xDocker image with onlyMODEL=IQ3_XXSwrote--pool-workers 10into its run config.tok/s: 3 interleaved pairs, a fresh engine per run, one warm-up answer, then two measured answers each (63-token prompt, 900 tokens out, temperature 0):
--pool-workers 9--pool-workers 9(19 Oct)So the new default is as fast as my hand-picked 9 in decode and about 11% faster on short prompts. Compared with 0.1.44.1, short prompts are read about 33-48% faster, because no worker sits on a core without L3 any more. Long prompts are unchanged (742 / 1,204 / 1,210 tok/s at 4K / 16K / 32K with
tools/strata_bench.py --long, against 741 / 1,195 / 1,224 on 0.1.44.1). Since today this NAS serves with 0.2.1 at the default worker count. Data and start-up logs: PR #2904, folderfollowup-2026-10-21/. From my side this issue can be closed.@Niko1221 commented on GitHub (Oct 24, 2026):
This is fixed in Strata 0.2.1. Please update to the latest release (in the Terminal:
strata update; in the app: download the newest installer from the releases page). If it still happens on the latest version, reply here and we will reopen it. Thank you for the report.