mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3847] macOS: conversation cache is always refused ("available RAM cannot be read") #1638
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#1638
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 @d4bk on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3847
On macOS the engine refuses the conversation cache even when
--conversation-cache-mibis set. Every start logs:Setup: engine 0.1.48 (
5c8dd3225+metal, from the v0.2.3 feed), Apple M4 Pro with 64 GB, macOS 27.2. Qwen3.8-Flash-Next Q2_0 with the experts streamed (STRATA_METAL_STREAM=1,STRATA_METAL_ARENA_GB=16),--conversation-cache-mib 2048.Cause, as far as I can see:
src/core/conversation_memory.cppreads the available memory from/proc/meminfo(Linux) or the Windows API. On macOS neither exists, soconversation_mem_availablereturns nothing and parking is refused. The Metal stream code reads the RAM fine in the same run:RAM 68.7 GB (35.4 GB available, 10.3 GB kept for macOS).Effect: Mabja, a local agent OS I'm building, sends short background requests between the turns of a long conversation, so it pays the full prompt again on every turn. Here an 11k-token prompt took 50–68 s per call, where the conversation cache would restore it in about a second (your measurement in
docs/RESEARCH_RUNS.md).Suggestion: give
conversation_memory.cppthe same macOS source the Metal arena budget already uses for "available".@github-actions[bot] commented on GitHub (Oct 23, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@d4bk commented on GitHub (Oct 23, 2026):
Update: on the same setup parking also fails for a second reason. After every request (130 times in one session) the engine logs
strata serve: conversation cache: skip parking (conversation snapshot: invalid checkpoint running-state payload), with the experts streamed on Metal (STRATA_METAL_STREAM=1). So fixing the RAM reading alone may not be enough on macOS. Within one conversation reuse works (5024 of 5037 tokens, 0.7 s); any request in between resets it to 0. One more observation: aSTOPsent while a long prompt is being read only takes effect at its end (17269 of 17276 read … (cancelled)). Is that by design?@fzql commented on GitHub (Oct 24, 2026):
Can confirm both the issue and the fix on macOS (tested on an M1 Ultra 64 GB).
In
src/core/conversation_memory.cpp, implementingsample_host_memory()for__APPLE__usingmach_host_self()andsysctl(CTL_HW, HW_MEMSIZE)restores the memory telemetry:This is actively being addressed in PR #3541 and PR #3564. When combined with Metal KV state binding in
Window::bind_session, conversation cache parking works end-to-end on macOS (tested with two concurrent sessions totaling 4.37 GB in RAM, cutting re-prefill stalls from 2.5 min down to 1.29 s).@github-actions[bot] commented on GitHub (Oct 29, 2026):
Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.
To bring it back: fix the title (area prefix) and the missing parts, then comment
/reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.