[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

Closed
opened 2026-11-04 01:50:21 +07:00 by bsakaguchi · 3 comments
Owner

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:

  1. The two LP-E cores are treated as P-cores. pool.cpp (Linux branch) decides P/E from Intel's hybrid PMU lists /sys/devices/cpu_core/cpus and /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, so is_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 9 the engine reports 9 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".
  2. The new 0.2.0 default (one worker per physical core but the host's) picks 15 workers here, and that is much slower than 9 on this CPU (single bench.py runs, same model and settings otherwise):
Engine Workers Short answer Long answer
0.2.0-beta prebuilt hip-rx7900 (0.1.45.3) --pool-workers 9 59.7 tok/s 64.0 tok/s
0.2.0-beta prebuilt hip-rx7900 (0.1.45.3) default → 15 (1,2,3,4,5,14,15,6,...,13) 39.8 tok/s 41.2 tok/s

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)

cpu_core/cpus     0-5     cpu_capacity 1024, max 5.1 GHz, private L2, L3 24 MiB
cpu_atom/cpus     6-13    cpu_capacity  774, max 4.4 GHz, L2 shared by 4 (6-9, 10-13), L3
cpu_lowpower/cpus 14-15   cpu_capacity  312, max 2.5 GHz, L2 shared by 2, no L3 (SoC tile)

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:

A: CPUs 0-15 (workers on 14, 15) B: CPUs 0-13
Decode tok/s, 6 answers 61.7–64.4, median 63.3 59.9–63.8, median 62.2
63-token prompt, prompt tok/s 60.6–69.0, median 66.1 91.4–95.4, median 93.9

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/cpus beside cpu_core and cpu_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

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: 1. **The two LP-E cores are treated as P-cores.** `pool.cpp` (Linux branch) decides P/E from Intel's hybrid PMU lists `/sys/devices/cpu_core/cpus` and `/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`, so `is_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 9` the engine reports `9 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". 2. **The new 0.2.0 default (one worker per physical core but the host's) picks 15 workers here**, and that is much slower than 9 on this CPU (single `bench.py` runs, same model and settings otherwise): | Engine | Workers | Short answer | Long answer | |---|---|---:|---:| | 0.2.0-beta prebuilt `hip-rx7900` (0.1.45.3) | `--pool-workers 9` | 59.7 tok/s | 64.0 tok/s | | 0.2.0-beta prebuilt `hip-rx7900` (0.1.45.3) | default → 15 (`1,2,3,4,5,14,15,6,...,13`) | 39.8 tok/s | 41.2 tok/s | 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) ``` cpu_core/cpus 0-5 cpu_capacity 1024, max 5.1 GHz, private L2, L3 24 MiB cpu_atom/cpus 6-13 cpu_capacity 774, max 4.4 GHz, L2 shared by 4 (6-9, 10-13), L3 cpu_lowpower/cpus 14-15 cpu_capacity 312, max 2.5 GHz, L2 shared by 2, no L3 (SoC tile) ``` ## 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: | | A: CPUs 0-15 (workers on 14, 15) | B: CPUs 0-13 | |---|---:|---:| | Decode tok/s, 6 answers | 61.7–64.4, median 63.3 | 59.9–63.8, median 62.2 | | 63-token prompt, prompt tok/s | 60.6–69.0, median 66.1 | 91.4–95.4, median 93.9 | 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/cpus` beside `cpu_core` and `cpu_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
Author
Owner

@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

<!-- gh-comment-id:6286731450 --> @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
Author
Owner

@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-rx7900 with control 0.1.46.2, single RX 7900 XTX, the same model and settings as in my first report (IQ3_XXS native pack, MTP rt, --max-context 262144 --kv int8 --spec 4).

Start-up log without --pool-workers:

strata generate: CPU pool: 10 workers by default (16 physical cores, 16 logical processors; bounded by the performance cores and half of the efficiency cores)
strata generate: 10 pool workers on logical processors 1,2,3,4,5,6,7,8,9,10, the host thread on 0 (draining too) (--host-core first)
strata aux cpus: threads that are neither pool workers nor the host go to CPUs 11,12,13,14,15 (off at start; a request's aux_cpus=1 turns it on)

The LP-E cores 14 and 15 are no longer used for workers, also with a fixed count: with --pool-workers 9 0.2.1 takes CPUs 1-9, where 0.2.0 took 1,2,3,4,5,14,15,6,7. Setup plans the same 10: the rocm-gfx110x Docker image with only MODEL=IQ3_XXS wrote --pool-workers 10 into 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):

workers decode tok/s, median (range) 63-token prompt tok/s, median (range)
0.2.1 default 10 on CPUs 1-10 61.1 (58.6-62.3) 97.6 (91.8-99.3)
0.2.1 --pool-workers 9 9 on CPUs 1-9 61.5 (59.9-64.3) 88.0 (86.2-90.3)
0.1.44.1 --pool-workers 9 (19 Oct) 9, incl. CPUs 14, 15 63.3 66.1
0.2.0-beta default (19 Oct) 15 39.8 / 41.2 (short / long answer) –

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, folder followup-2026-10-21/. From my side this issue can be closed.

<!-- gh-comment-id:6304337239 --> @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-rx7900` with control 0.1.46.2, single RX 7900 XTX, the same model and settings as in my first report (IQ3_XXS native pack, MTP `rt`, `--max-context 262144 --kv int8 --spec 4`). **Start-up log without `--pool-workers`:** ``` strata generate: CPU pool: 10 workers by default (16 physical cores, 16 logical processors; bounded by the performance cores and half of the efficiency cores) strata generate: 10 pool workers on logical processors 1,2,3,4,5,6,7,8,9,10, the host thread on 0 (draining too) (--host-core first) strata aux cpus: threads that are neither pool workers nor the host go to CPUs 11,12,13,14,15 (off at start; a request's aux_cpus=1 turns it on) ``` The LP-E cores 14 and 15 are no longer used for workers, also with a fixed count: with `--pool-workers 9` 0.2.1 takes CPUs 1-9, where 0.2.0 took `1,2,3,4,5,14,15,6,7`. Setup plans the same 10: the `rocm-gfx110x` Docker image with only `MODEL=IQ3_XXS` wrote `--pool-workers 10` into 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): | | workers | decode tok/s, median (range) | 63-token prompt tok/s, median (range) | |---|---|---:|---:| | 0.2.1 default | 10 on CPUs 1-10 | 61.1 (58.6-62.3) | **97.6** (91.8-99.3) | | 0.2.1 `--pool-workers 9` | 9 on CPUs 1-9 | 61.5 (59.9-64.3) | 88.0 (86.2-90.3) | | 0.1.44.1 `--pool-workers 9` (19 Oct) | 9, incl. CPUs 14, 15 | 63.3 | 66.1 | | 0.2.0-beta default (19 Oct) | 15 | 39.8 / 41.2 (short / long answer) | – | 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, folder `followup-2026-10-21/`. From my side this issue can be closed.
Author
Owner

@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.

<!-- gh-comment-id:6383462163 --> @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.
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#1323
No description provided.