How Much Swap Should I Use With 64 GB of RAM?

August 18, 2026 3 answers
Asked by carry-on-only
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?

Answers

3min-drill
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.

carry-on-only: That makes sense. Iโ€™d rather have the system slow down temporarily than crash outright.

Reply to this answer
!fifoEmpty
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.
Reply to this answer
2mm_topstitch
Swap can also be provided through compressed memory options such as zram or zswap. These can help absorb short-lived memory pressure without immediately relying on disk storage. A setup with 8 GB of swap alongside zswap is one practical approach, but it isnโ€™t mandatory if your workloads never approach the available RAM.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions