Swap or not?

You should set up a swap device whether or not you have a lot of memory. Swap isn’t just for OOM situations; it can actually help make RAM more efficient, and also (as it sounds you may have discovered) some applications map directly to swap even in situations where that is not ideal.

The article in post #2 of this thread is informative if you are interested: https://chrisdown.name/2018/01/02/in-defence-of-swap.html

This thread is an interesting read as well: https://unix.stackexchange.com/a/190521

If you have plenty of RAM, you can set up zram and use it as a swap device. It’s faster than a disk-based swap device and spares your disk unnecessary writes. https://wiki.archlinux.org/title/Zram

2 Likes