I'm running Gentoo on a system with 12 hardware threads and 64 GB of RAM. With that much memory and a relatively low thread count, is swap still recommended? If so, what would be a sensible amount, and are options like zram or zswap worth considering?
3 Answers
Swap isn’t strictly required for a machine with 64 GB of memory, but there’s usually little downside to keeping some available. In the event of a runaway process, the system might become extremely slow, but it can remain responsive long enough for you to identify and stop the problem instead of immediately crashing.
A small swap file is a reasonable setup. For example, 8 GB is commonly used on systems in this range, and zswap or zram can help reduce the amount of physical disk I/O. The exact size depends more on your workload and whether you need hibernation than on the number of CPU threads.
You may never touch it during normal use, but having a few gigabytes of swap is still useful. It gives the system somewhere to put less frequently used pages and provides a bit of protection if a process unexpectedly consumes most of your RAM.

That makes sense. I’d rather have the machine slow down temporarily than lose the whole session if something goes wrong.