ACPI S4 Hibernation would like to have a word with you
I dislike swap solely because it gets used and when I accidentally open the same file twice then I regularly encounter problems with swap files when opening the file again later.
Can anyone tell me why I see swap usage with 10+GB of free RAM available?
Swappiness set to over 9000!
Saving ram to swap can be done with minimal impact. Helpful when you run out of memory and that 2gb app idling can be dumped right away instead of waiting for it to be copied to swap.
but that’s not what’s happening. processes do actually get removed from RAM, and when they are needed they are very slow until they are loaded back. the system thinks it’s more valuable to have that memory be filesystem cache
If true then Linux is a decade behind windows and macOS.
I used to be this guy. We have huge amount of memory in our storage server. Why would we need swap? Well, once the system started killing programs I read up on swap and how the system handles its caches, especially ZFS ARC.
Short version is that while the system can evict its caches syncronously, it can only async notify ZFS that it should also shrink its caches, but the out-of-memory killer will start killing before ZFS and its kernel counterpart can start to free up memory.
A tiny bit of swap completely solved this, since swapping is sync for the kernel and the OOM killer will wait for it.



