[GH-ISSUE #2316] [Bug] Repeated requests sharing a large prefix collapse the checkpoint replay path to 7-21 tok/s (cold prefill: 2100+); --prompt-cache 0 avoids it #936

Closed
opened 2026-11-04 01:47:09 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Jerry-Lee661 on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2316

Environment

  • Strata v0.1.43.1, Linux (Ubuntu 26.04.1), self-built for HIP
  • 2× AMD Radeon RX 7900 XTX (gfx1100), layer split auto, dual-socket-free E5-2673 v3, 128 GB DDR3
  • Model: Qwen3.8-Flash-Next (Swift-1.5 GSQ-RCO abliterated), native IQ3_S pack + experts.bin (48.4 GiB)
  • Relevant flags: --serve --ple-io ram --kv k8v4 --max-context 524288 --rope-scaling yarn --spec 3 --prefill auto --expert-profile <shipped> --expert-cache 4096; prompt-cache left at defaults (6, every 16384)

Symptom

On the same running instance, re-submitting a request that shares a large (~48K tok) prefix with an earlier request collapses the effective prompt throughput to 7-21 tok/s — vs 2050-2170 tok/s for a cold prompt of identical length. Decode is unaffected. The first large prefill after a restart is always full speed; repeats of the same request collapse.

Isolation (three experiments, same session)

  1. 48K prompt, first (cold) = 2059 tok/s. Same prompt again (cache hit) = 17.4 → 7.0 tok/s on subsequent repeats.
  2. A different 48K prompt with no shared prefix = 2155 tok/s (full speed) → rules out a generic "second big prefill" state problem.
  3. --prompt-cache 0 + restart → three consecutive same-prefix 48K requests = 2111 / 2164 / 2172 tok/s. Symptom gone.

This points at the conversation-checkpoint replay path: on a cache hit, the restore/replay of the cached prefix runs ~100-300× slower than a cold prefill of the same content.

Notes

  • The restore seems to be the slow part: prompt_per_second is computed over the non-cached suffix, and the wall time is dominated by the replay of the cached prefix.
  • Possibly related to #1703 (long prompts get re-read from the beginning), but there the re-read runs at normal speed (~1684 tok/s in that report); here the cache-hit path itself is 100-300× slower than cold.
  • Reproduces on default cache flags (--prompt-cache 6, --prompt-cache-every 16384).

Workaround

--prompt-cache 0 — fully removes the collapse. In-session incremental prefill still works; only idle-session checkpoint parking is lost.

Platform numbers (same build, for context)

  • 48K prefill: 2050-2172 tok/s; ~342K prefill: 1947 tok/s (cold, no shared prefix)
  • Short-prompt decode: 43-47 tok/s; 300-token prose: 33-47 tok/s (45-47 with STRATA_SPLIT_OVERLAP=1 from self-built #1120)
  • NIAH-style retrieval correct at 325K / 417K / 502K input tokens

Happy to provide full command lines, logs, or run any probe on this machine.

Originally created by @Jerry-Lee661 on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2316 ## Environment - Strata v0.1.43.1, Linux (Ubuntu 26.04.1), self-built for HIP - 2× AMD Radeon RX 7900 XTX (gfx1100), layer split `auto`, dual-socket-free E5-2673 v3, 128 GB DDR3 - Model: Qwen3.8-Flash-Next (Swift-1.5 GSQ-RCO abliterated), native IQ3_S pack + experts.bin (48.4 GiB) - Relevant flags: `--serve --ple-io ram --kv k8v4 --max-context 524288 --rope-scaling yarn --spec 3 --prefill auto --expert-profile <shipped> --expert-cache 4096`; prompt-cache left at defaults (`6`, every `16384`) ## Symptom On the same running instance, re-submitting a request that shares a large (~48K tok) prefix with an earlier request collapses the effective prompt throughput to **7-21 tok/s** — vs **2050-2170 tok/s** for a cold prompt of identical length. Decode is unaffected. The first large prefill after a restart is always full speed; repeats of the same request collapse. ## Isolation (three experiments, same session) 1. 48K prompt, first (cold) = **2059 tok/s**. Same prompt again (cache hit) = **17.4 → 7.0 tok/s** on subsequent repeats. 2. A *different* 48K prompt with no shared prefix = **2155 tok/s** (full speed) → rules out a generic "second big prefill" state problem. 3. `--prompt-cache 0` + restart → three consecutive same-prefix 48K requests = **2111 / 2164 / 2172 tok/s**. Symptom gone. This points at the conversation-checkpoint replay path: on a cache hit, the restore/replay of the cached prefix runs ~100-300× slower than a cold prefill of the same content. ## Notes - The restore seems to be the slow part: `prompt_per_second` is computed over the non-cached suffix, and the wall time is dominated by the replay of the cached prefix. - Possibly related to #1703 (long prompts get re-read from the beginning), but there the re-read runs at normal speed (~1684 tok/s in that report); here the cache-hit path itself is 100-300× slower than cold. - Reproduces on default cache flags (`--prompt-cache 6`, `--prompt-cache-every 16384`). ## Workaround `--prompt-cache 0` — fully removes the collapse. In-session incremental prefill still works; only idle-session checkpoint parking is lost. ## Platform numbers (same build, for context) - 48K prefill: 2050-2172 tok/s; ~342K prefill: 1947 tok/s (cold, no shared prefix) - Short-prompt decode: 43-47 tok/s; 300-token prose: 33-47 tok/s (45-47 with `STRATA_SPLIT_OVERLAP=1` from self-built #1120) - NIAH-style retrieval correct at 325K / 417K / 502K input tokens Happy to provide full command lines, logs, or run any probe on this machine.
Author
Owner

@Jerry-Lee661 commented on GitHub (Oct 14, 2026):

Update from the reporter: the collapse does not reproduce on 0.1.44.1.

Same machine (2x RX 7900 XTX, gfx1100, ROCm, Xeon E5-2673 v3, 128 GB DDR3), same config family as the original report (Swift IQ3_S, 512K, k8v4, conversation cache 16 GiB, prefix reuse left on), only the engine changed: our 0.1.43.1-era self-build -> our 0.1.44.1 self-build.

Repeat-prefix test: one identical ~29.5K-token prompt sent five times in a row on a fresh start (no other prompts parked):

c1 (cold):      29,496 tokens = 0 reused + 29,496 read in 17.3 s (1,702 tok/s)
c2 (same):      29,496 tokens = 29,489 reused + 7 read in 0.74 s
c3 (same):      29,496 tokens = 29,489 reused + 7 read in 1.01 s
c4 (one sentence appended):
                29,506 tokens = 16,384 reused + 13,122 read in 9.9 s (1,327 tok/s)
c5 (c4 again):  29,506 tokens = 29,499 reused + 7 read in 0.77 s

The replays go through the checkpoint path (the log shows the park/checkpoint lines, "2 checkpoints") and restore in under a second, including after a tail change. On the 0.1.43.1-era build the same pattern collapsed as described in the original report. I could not find a prompt-cache/replay entry in the 0.1.44 or 0.1.44.1 notes, so this may have been fixed silently, or the original trigger was narrower than I described. Either way: I have turned the --prompt-cache 0 workaround off on 0.1.44.1 and will report here if the collapse comes back on longer runs. Feel free to close as fixed if this matches a change you made; the recipe in the original report still reproduces the old behavior on the older build.

(Unrelated note from the same setup, in case the wording is worth a line: with --pipeline-windows 2 set explicitly on a layer split that has no --mtp draft installed (lookup/suffix drafts only), the engine logs --pipeline-windows 2 is off: it needs the MTP drafter (--mtp, --spec). Clear and correct, just mentioning it since this setup turns it on by default on RDNA4 only.)

<!-- gh-comment-id:6162060647 --> @Jerry-Lee661 commented on GitHub (Oct 14, 2026): Update from the reporter: the collapse does not reproduce on 0.1.44.1. Same machine (2x RX 7900 XTX, gfx1100, ROCm, Xeon E5-2673 v3, 128 GB DDR3), same config family as the original report (Swift IQ3_S, 512K, k8v4, conversation cache 16 GiB, prefix reuse left on), only the engine changed: our 0.1.43.1-era self-build -> our 0.1.44.1 self-build. Repeat-prefix test: one identical ~29.5K-token prompt sent five times in a row on a fresh start (no other prompts parked): ``` c1 (cold): 29,496 tokens = 0 reused + 29,496 read in 17.3 s (1,702 tok/s) c2 (same): 29,496 tokens = 29,489 reused + 7 read in 0.74 s c3 (same): 29,496 tokens = 29,489 reused + 7 read in 1.01 s c4 (one sentence appended): 29,506 tokens = 16,384 reused + 13,122 read in 9.9 s (1,327 tok/s) c5 (c4 again): 29,506 tokens = 29,499 reused + 7 read in 0.77 s ``` The replays go through the checkpoint path (the log shows the park/checkpoint lines, "2 checkpoints") and restore in under a second, including after a tail change. On the 0.1.43.1-era build the same pattern collapsed as described in the original report. I could not find a prompt-cache/replay entry in the 0.1.44 or 0.1.44.1 notes, so this may have been fixed silently, or the original trigger was narrower than I described. Either way: I have turned the `--prompt-cache 0` workaround off on 0.1.44.1 and will report here if the collapse comes back on longer runs. Feel free to close as fixed if this matches a change you made; the recipe in the original report still reproduces the old behavior on the older build. (Unrelated note from the same setup, in case the wording is worth a line: with `--pipeline-windows 2` set explicitly on a layer split that has no `--mtp` draft installed (lookup/suffix drafts only), the engine logs `--pipeline-windows 2 is off: it needs the MTP drafter (--mtp, --spec)`. Clear and correct, just mentioning it since this setup turns it on by default on RDNA4 only.)
Author
Owner

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

Thanks for taking the time to report this.

We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6270954689 --> @Niko1221 commented on GitHub (Oct 19, 2026): Thanks for taking the time to report this. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#936
No description provided.