mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2033] [Enhancement] Mark conversation cache MADV_COLD to use swap preferentially on Linux #808
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#808
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 @Interpause on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2033
On a 64GB system running IQ3_S, there is no RAM left for a conversation cache. However, in long-running agentic workloads, this can lead to quite a bit of time reprocessing context (~30s on avg for me).
My suggestion is to mark conversation cache memory allocation as MADV_COLD, which on Linux indicates to the kernel that these allocations can be opportunistically moved to swap. The time taken to move cached convos from swap back to VRAM should be much faster. And this would work transparently vs disk-backed cache which has code complexity, staleness issues and requires manual operation via the slot save & load routes. The downside of course is that swap-backed cache isn't disk-backed.
I am not sure if even more can be done besides MADV_COLD, for example to outright allocate on swap or protect the limited RAM left being used between whatever strata puts into disk-backed page cache and other system processes.
I will try making the modification to see if the added memory pressure causes any issues.
@Interpause commented on GitHub (Oct 12, 2026):
Or if #1937 goes ahead, it might be better, my proposal is more of a stopgap.
@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.