3 ms·
I've experimented with no-swap and find the same thing happens. I think the issue is that linux can also evict executable pages (since it can just reload them f
by webstrand 1y ago
I've experimented with no-swap and find the same thing happens. I think the issue is that linux can also evict executable pages (since it can just reload them from disk).
I've had good experience with linux's multi-generation LRU feature, specifically the /sys/kernel/mm/lru_gen/min_ttl_ms feature that triggers OOM-killer when the "working set of the last N ms doesn't fit in memory".
- ValdikSS 1y agoEnables Multi-Gen LRU (improved page reclaim and caching policy). Prevents thrashing, improves loading speeds under low ram conditions. Requires kernel 6.1+. Has dramatic effect especially on slower HDDs. For slower HDDs, consider 1000 instead of 300 for min_ttl_ms. sudo tee /etc/tmpfiles.d/mglru.conf <<EOF w- /sys/kernel/mm/lru_gen/enabled - - - - y w- /sys/kernel/mm/lru_gen/min_ttl_ms - - - - 300 EOF