mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2923] [Bug] conversation cache skips snapshot restore under RAM pressure: parked -> next request does a full 310-372K re-prefill (4/4), same sequence recovers normally when RAM is plentiful #1178
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#1178
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 @xzphot on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2923
Related: #2228 (coarse-checkpoint fallback for a fast client — same family, mild form: 6.8K-47K re-reads; this report is the heavy form with a RAM-pressure variable), #2316 (slow replay on cache hit), #2409/#2408 (restore-path OOMs).
One more observation: the leftover
reusedvalue is always exactly 16384 — the default--prompt-cachegrid step — which matches #2228's 32,768-grid finding (their rig sets--prefill auto:32768). So under RAM pressure the engine seems to fall back to the first grid checkpoint (or skip restore entirely) and re-prefill everything since.Environment
--max-context 524288 --kv int8 --conversation-cache-mib 12288 --conversation-cache-slots 3 --conversation-cache-min-free-mib 2048Symptom
4 times tonight, the first request after a successful
parkeddid not recover the snapshot and instead did a full re-prefill (310K–372K tokens read, 233–285 s at ~1300 tok/s):The re-read request is just snapshot + ~2K new tokens (
330755 = 328669 + 2086), so the recovery path should have hit. Same pattern at 335593 (cancelled after 233 s re-read), 336411, and 388629:All 4 re-reads follow a
parkedwithin one log line. Zero re-reads happened in any other situation tonight.Control group (same day, ~8 hours earlier, RAM not yet tight)
Same sequence — parked, then next request — recovers and hits normally even at 449K tokens:
Restore latency comparison, same magnitude snapshots:
So under RAM pressure snapshots page out, and the engine appears to skip the recovery path entirely and re-prefill from scratch — 4-5 minutes instead of seconds.
Secondary observation
--conversation-cache-mib 12288cannot hold two snapshots of a 380K-token session (7.0–7.7 GB each):Question
Is skipping recovery under RAM pressure intentional (avoid page-in death spiral), or should the engine prefer restoring the snapshot? Even with a slow page-in (~5-20 s), restoring beats a 285 s re-prefill by an order of magnitude. Either way, a log line explaining why recovery was not attempted would help diagnosis.
Also: is 12 GB a reasonable default budget for
--conversation-cache-mibon a 79.9 GB machine running ~400K-token sessions, given one snapshot alone is 7+ GB?@saffyk1 commented on GitHub (Oct 17, 2026):
why dont you try
in args
"--resident-budget-gib",
"36" <--- you can play with this value based on your card and ram
with
in env
"STRATA_UNBUFFERED_LOAD": "1"
and this will give you enough ram only slightly decreasing the first token speed but it will pick up gradually
@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:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.