I'm setting up a Gentoo system with 12 hardware threads and 64 GB of memory. With that much RAM and a relatively modest thread count, is swap still useful or necessary? If it is recommended, roughly how much should I allocate, and are options like zram or zswap worth considering?
2 Answers
The exact amount is debatable, and it depends on whether you need hibernation. Without hibernation, a modest swap file or partition is generally enough for a system with 64 GB of RAM. Around 4–8 GB is a reasonable starting point, assuming you aren’t regularly running memory-heavy workloads.
You probably won’t need swap during normal use, but there’s little downside to setting aside a few gigabytes. Swap can prevent an occasional memory spike or runaway process from immediately crashing the system. The machine may become very slow while swapping, but staying online gives you a chance to diagnose and fix the problem.

That makes sense. I’d rather have the system slow down temporarily than crash outright.