[GH-ISSUE #1729] 0.1.41: STRATA_PREFILL_CPU_SHARE on by default halves decode throughput on a CPU without AVX-512 (i9-14900KF + RTX 5090 D, Windows), and auto decides sharing pays when it does not #689

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

Originally created by @Simonqujian78 on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1729

Summary
On 0.1.41 my decode throughput dropped from a stable ~110 tok/s to ~46 tok/s (2.4x slower), and a cold
84k-token prompt read ran at 1,892 tok/s instead of ~5,066 tok/s. Both are the opposite of what the
0.1.41 release notes claim for this feature.
Turning the new default off with STRATA_PREFILL_CPU_SHARE=0 restores both numbers (and higher). I believe
auto misjudges how much share a CPU without AVX-512 can take, and that the resulting permanently-engaged
CPU pool also slows down decode, which the feature was only measured on prompt time.

github-issue-0.1.41-cpu-share.md

Originally created by @Simonqujian78 on GitHub (Oct 9, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1729 Summary On 0.1.41 my decode throughput dropped from a stable ~110 tok/s to ~46 tok/s (2.4x slower), and a cold 84k-token prompt read ran at 1,892 tok/s instead of ~5,066 tok/s. Both are the opposite of what the 0.1.41 release notes claim for this feature. Turning the new default off with STRATA_PREFILL_CPU_SHARE=0 restores both numbers (and higher). I believe auto misjudges how much share a CPU without AVX-512 can take, and that the resulting permanently-engaged CPU pool also slows down decode, which the feature was only measured on prompt time. [github-issue-0.1.41-cpu-share.md](https://github.com/user-attachments/files/33255929/github-issue-0.1.41-cpu-share.md)
Author
Owner

@phoenixclyde commented on GitHub (Oct 9, 2026):

This one is CUDA, so the AMD build's guard bug does not explain it; posting the AMD side for completeness, because it is the same feature turned on by a different mechanism.

On gfx906 the CPU share is on by default because that build never defines STRATA_USE_HIP (see src/core/expert_cache.cpp:5-6), so prefill.cpp:1839 takes the CUDA branch. Measured on one MI50 32 GB, CLI generate, 4-token prompt, two arms, identical output:

default   experts streamed 309 (295 by DMA, host 174.0 ms), resident 607,
          on the CPU 197 (share 0.90)      prefill 928.3 ms
=0        experts streamed 506 (492 by DMA, host 177.3 ms), resident 606,
          on the CPU 0   (share 0.00)      prefill 929.5 ms

We only measured prompt time here, so we cannot say anything about decode on gfx906 either way - if it would help, we can run your 3-round protocol on that box and report decode as well.

Fix for the AMD side: one line at prefill.cpp:1839 (#1732)

<!-- gh-comment-id:6083993347 --> @phoenixclyde commented on GitHub (Oct 9, 2026): This one is CUDA, so the AMD build's guard bug does not explain it; posting the AMD side for completeness, because it is the same feature turned on by a different mechanism. On gfx906 the CPU share is on by default because that build never defines `STRATA_USE_HIP` (see `src/core/expert_cache.cpp:5-6`), so `prefill.cpp:1839` takes the CUDA branch. Measured on one MI50 32 GB, CLI `generate`, 4-token prompt, two arms, identical output: ``` default experts streamed 309 (295 by DMA, host 174.0 ms), resident 607, on the CPU 197 (share 0.90) prefill 928.3 ms =0 experts streamed 506 (492 by DMA, host 177.3 ms), resident 606, on the CPU 0 (share 0.00) prefill 929.5 ms ``` We only measured prompt time here, so we cannot say anything about decode on gfx906 either way - if it would help, we can run your 3-round protocol on that box and report decode as well. Fix for the AMD side: one line at `prefill.cpp:1839` (#1732)
Author
Owner

@Niko1221 commented on GitHub (Oct 10, 2026):

Thank you for the detailed log analysis, the GPU power and the split by session were exactly what we needed to look at.

We tried to reproduce the decode loss on two CPUs without AVX-512 (Core Ultra 7 265 with an RTX 3060, Xeon E5-2643 v3 with an RTX A4000), IQ3_XXS native pack with --resident-experts, the 0.1.42 candidate, 5 interleaved pairs of default vs STRATA_PREFILL_CPU_SHARE=0, 40 chat-like requests per run (prompts of 60 to 7000 tokens, 128 tokens decoded each). Decode: 47.5 vs 47.0 tok/s and 43.0 vs 42.9 tok/s, no difference, and no drift between the first and the last requests of a run. Prompts below 1024 tokens: 1,053 vs 1,444 ms and 1,395 vs 1,992 ms (about 30% faster with the share). So on those two machines the share does not touch decode, and we could not make the pool stay busy after a prompt.

That means we have not found your cause yet, and we do not want to turn the feature off for every CPU without AVX-512 on this evidence. What we know of your run: the drop came mid-session (request ~100), GPU power fell to ~170 W with ~22 cores busy, and the cache hit rate did not move. 0.1.42 adds a check that leaves the share off when RAM or the Windows commit limit is short at start-up, and turns it off for the run if a host allocation fails, which would cover a memory-pressure cause, but we cannot say yet that this is yours.

Could you help with one thing: when it is slow again, leave the engine running and send: (1) the 'prefill:' / 'on the CPU N (share X)' lines of the last few prompts from strata-*.log, (2) Task Manager / Resource Monitor memory at that moment (in use, standby, commit, and the Hard Faults/sec of strata.exe), and (3) the clean control you mention: the same session with the default, restarted with only STRATA_PREFILL_CPU_SHARE=0 and the same request mix. Until then STRATA_PREFILL_CPU_SHARE=0 is the right setting for you.

<!-- gh-comment-id:6099749676 --> @Niko1221 commented on GitHub (Oct 10, 2026): Thank you for the detailed log analysis, the GPU power and the split by session were exactly what we needed to look at. We tried to reproduce the decode loss on two CPUs without AVX-512 (Core Ultra 7 265 with an RTX 3060, Xeon E5-2643 v3 with an RTX A4000), IQ3_XXS native pack with --resident-experts, the 0.1.42 candidate, 5 interleaved pairs of default vs STRATA_PREFILL_CPU_SHARE=0, 40 chat-like requests per run (prompts of 60 to 7000 tokens, 128 tokens decoded each). Decode: 47.5 vs 47.0 tok/s and 43.0 vs 42.9 tok/s, no difference, and no drift between the first and the last requests of a run. Prompts below 1024 tokens: 1,053 vs 1,444 ms and 1,395 vs 1,992 ms (about 30% faster with the share). So on those two machines the share does not touch decode, and we could not make the pool stay busy after a prompt. That means we have not found your cause yet, and we do not want to turn the feature off for every CPU without AVX-512 on this evidence. What we know of your run: the drop came mid-session (request ~100), GPU power fell to ~170 W with ~22 cores busy, and the cache hit rate did not move. 0.1.42 adds a check that leaves the share off when RAM or the Windows commit limit is short at start-up, and turns it off for the run if a host allocation fails, which would cover a memory-pressure cause, but we cannot say yet that this is yours. Could you help with one thing: when it is slow again, leave the engine running and send: (1) the 'prefill:' / 'on the CPU N (share X)' lines of the last few prompts from strata-*.log, (2) Task Manager / Resource Monitor memory at that moment (in use, standby, commit, and the Hard Faults/sec of strata.exe), and (3) the clean control you mention: the same session with the default, restarted with only STRATA_PREFILL_CPU_SHARE=0 and the same request mix. Until then STRATA_PREFILL_CPU_SHARE=0 is the right setting for you.
Author
Owner

@phoenixclyde commented on GitHub (Oct 10, 2026):

Correction to our own comment of 2026-10-09: we only measured prompt time there (prefill 928.3 ms vs 929.5 ms, identical output), so it should not be read as evidence for the decode half of this report. We did not measure decode on our gfx906 box.

(phoenixclyde - status check from our gfx906 test rig)

<!-- gh-comment-id:6101650984 --> @phoenixclyde commented on GitHub (Oct 10, 2026): Correction to our own comment of 2026-10-09: we only measured prompt time there (prefill 928.3 ms vs 929.5 ms, identical output), so it should not be read as evidence for the decode half of this report. We did not measure decode on our gfx906 box. *(phoenixclyde - status check from our gfx906 test rig)*
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#689
No description provided.