4 ms·
I don't understand modern swap. Ok you can page out a few MB you don't use on a regular basis, but any swapping kills the machine. I'd far rather OOMkiller kil
by isostatic 9y ago
I don't understand modern swap. Ok you can page out a few MB you don't use on a regular basis, but any swapping kills the machine.
I'd far rather OOMkiller killed off non active tabs (there's almost always a web browser using the memory on a desktop), or run away apache processses, than try to swap. For that reason I never configure swap on any of my machines.
- zzzcpan 9y agoThe regular old swap is slightly technologically behind today's needs. It is supposed to be replaced by things like zram and zswap, that don't kill the machine.
- greenleafjacob 9y agoSwap can be useful for batch jobs that need lots of memory to run but the working set is small. Then you can keep the physical memory for the working set and the disk swap for the (larger) whole set of memory.
- Avamander 9y agoMy experience has been that if the usage grows slowly and the system is instructed to actually load stuff to swap I can safely go to the limits of my swap and physical ram space without any freezes and nothing dying (although ofc taking more time, but the alternative is not using the software at all).
- barrkel 9y agoIt doesn't make sense on a server, but on a desktop, unless it's actively thrashing, swapping is normally fine. It's not cool to kill off the user's possibly unsaved work with a few random process terminations. There are other, more cooperative ways of doing it. For example, always save enough state to restore after a kill when becoming a background task. But it's also more work.