mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4081] [Engine] conversation cache: parked conversations are never restored on Linux/HIP (gfx1100) — parks accumulate, 'session restored' never logs #1775
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#1775
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 @ts200949680 on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4081
Environment
0.1.49.2(BUILD.json:source=local-hip,backend=hip,archs=[gfx1100],src=b9993e25b7e78735, built 2026-10-24)_rocm_sdk_*wheels (hipBLASLt 1.4.1), engine started viaserve/server.py --engine strata--serve --pack ... --native ... --kv int8 --kv-resident 32768 --batch 2 --conversation-cache-mib 8192 --max-context 262144 --prefill auto:32768 --spec 4 --mtp ... --prompt-cache 4(also tried--conversation-cache-mib 16384 --conversation-cache-slots 4/16, single replica, dual replicas)envblock the working CUDA box uses (STRATA_KV_PREFETCH=1,STRATA_CACHE_MESSAGE_BOUNDARY=1, …)Observation
serveparks conversations on every turn and never restores any of them. Over ~30 alternating-conversation requests the engine log shows:grep -c "session restored"over every engine log line written since this engine version was installed: 0./metrics→conversation_cache:parks=22 restores=0 reused_tokens=0whileparkedclimbs to the slot limit and evictions follow.The next request that is an exact continuation of a parked conversation (same tokens, same images, temperature 0, the client echoes the model's own previous reply back as the assistant turn) reports
cache_n=0and re-reads the whole prompt (2,741 tokens ≈ 4.3–4.6 s). This never changes:0 reusedonce the request has left the hot batch slot);--conversation-cache-mib 8192or16384,--conversation-cache-slotsunset / 4 / 16;--batch 2or without;0.1.44.1(2× RTX 4090D) restores from the first park:prompt 6658 tokens = 6642 reused + 16 read in 150 ms,conversation_cache: restores=115, 14× TTFT improvement — the client script is byte-identical.Two reuse paths do work here, neither goes through the conversation cache:
= 2611 reused + 5 read in 245 ms, nosession restoredline);So parking writes snapshots the read-back path never consults on Linux/HIP.
Reproduction
Python 3, no dependencies beyond urllib; two conversations sharing one 2,624-token system prompt, alternating, each turn echoing the previous real reply back:
Expected: from r1 on, every turn hits its parked snapshot (
cache_n ≈ prompt-16, ~0.2 s, onesession restoredline in the engine log).Actual on Linux/HIP gfx1100 0.1.49.2:
cache=0and 4+ s on every turn after the conversation leaves the hot slot;restores=0.Ruled out
evictions=0while the miss happens; 16 GiB / 16 slots same);STRATA_KV_PREFETCH=0,STRATA_CACHE_MESSAGE_BOUNDARY=0(both make no difference);parkedlines print with realsnapshot_bytes(~278 MB for 2.7k tokens, ≈ 103 KB/token, as documented).Related
Question: is the parked-snapshot read-back expected to work at all with
--backend hipon Linux, and if so, which switch or code path decides it? Happy to run candidate builds or traces on this 2× gfx1100 rig.Not covered
local-hip); the previous engine on this box (0.1.49, kept asstrata.0.1.49.backup) was not re-tested with this script, so "regression in 0.1.49.2" is not established — restore may never have worked on Linux/HIP.@ts200949680 commented on GitHub (Oct 25, 2026):
Two corrections to my description above (the observations and numbers are unchanged):
In "Observation", "the client script is byte-identical" overstates it. The CUDA control ran the same script with the same method (two alternating conversations, real replies echoed back, temperature 0), but not the same bytes: the conversation texts were Chinese and the CUDA box's endpoint needs an api_key. The control's numbers (
6658 = 6642 reused + 16 read in 150 ms,restores=115) are from that equivalent run, and the reproduction script above hits on that box in the same way.In "Ruled out", "≈ 103 KB/token, as documented" — 103 KB/token is my own measurement on this rig (
snapshot_bytes / parked_tokens); #3231 reports ~82 KB/token under its settings, presumably a different KV configuration. Not a documented figure for this setup, just measured.@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.