mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1009] 8 GB card: 0.1.39's default prefill is ~40% slower than 0.1.31 (prompt chunk 512 -> 256 when borrowing cache slots) #443
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#443
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 @hiru0118 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1009
Posted on behalf of a friend. The measurements, investigation and write-up below are theirs. They could not post it from their own environment, so I am posting it for them. If you have questions, I will check with them and reply here.
On an 8 GB card, 0.1.39's default
--prefill autoreads long prompts about 40% slower than 0.1.31 did on the same PC: 190-197 tok/s became 114-117 tok/s on a 22K-token prompt. The log shows the prompt chunk at 256 tokens where 0.1.31 used 512. Adding--prefill 512 --no-prefill-borrowbrings it back (208 tok/s).Environment
6f32ec0), ready-made engine 0.1.39 (CUDA 13.0). Compared with 0.1.31 (9259cad) on the same PC.--family coder --model IQ1_M --context 32768 --kv int8 --vision no --experimental-speed-projection offI know 8 GB is below the README's 12 GB recommendation. I am reporting it because 0.1.31 was faster on this card with the same config.
Measurements
Each row is one run. Prefill and decode are the server's
timings; TTFT is to the first token (thinking included).STRATA_RING_BYTES=0--prefill 512 --no-prefill-borrowPrompts were 6,851-6,853 and 22,370-22,375 tokens. On 0.1.31 the cache size varied between starts (181-240 slots).
Logs
0.1.31:
0.1.39, default:
0.1.39 with only
--prefill 512(start-up only, not benchmarked):0.1.39 with
--prefill 512 --no-prefill-borrow:The log does not print the chunk for this last run. I read it as 512 because I asked for 512, there is no "512 -> 256" line, and prefill came back to the 0.1.31 level.
Why, as far as I can tell
A 256-token chunk borrows 146 of the 309 cache slots, so a 512-token chunk would need roughly twice that, about 290. The loan has to leave 128 slots in the cache (
fits_oneinsrc/program/generate.cpp), and 290 + 128 > 309, so the chunk drops to 256.STRATA_RING_BYTES=0does not change this (prefill stayed at 114 tok/s).Workaround
Add
--prefill 512 --no-prefill-borrowto the config's args. On this PC the expert cache then shrinks to 1 slot (the decode hit rate went from 14-22% to 0.1%), but decode did not get slower (21.2 vs 19.0 tok/s on the 22K prompt). Setup does not carry hand-added args over when it rewrites the config, so this has to be re-added after each update.Caveats
--resident-expertswas not the same across runs (0.1.31: none, it fell back to mmap; 0.1.39 default: 15.7 GiB;STRATA_RING_BYTES=0: 21.0 GiB; the workaround: 18.5 GiB), because free RAM at start differed. Prefill did not follow it (113.9-116.9 tok/s at 15.7 and 21.0 GiB).Possible change
When owned buffers allow a larger chunk than the borrowing plan can get, the auto choice could take the owned path, as on 0.1.31. #658 proposes something close to this (measured on an RTX 5090). Related: #765, #796.
How it was measured
For each config the server was restarted, then one warm-up request, a 56-token code request, an ~8K prompt plus one follow-up, and a ~22K prompt plus one follow-up, all through
/v1/chat/completionswith streaming,reasoning_effort: medium,temperature: 0. The long prompts are Strata's own source files from9259cadfollowed by a short question, so they are nearly the same token count on both engines. The OS file cache was not controlled.@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.