How much swap should I use with 64 GB of RAM?
Asked by
tariff discussion
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?
Answers
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.
Reply to this answer
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.
Reply to this answer
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.
Reply to this answer
Add your answer
Answers are reviewed before publication.
tariff discussion: That makes sense. Iโd rather have the machine slow down temporarily than lose the whole session if something goes wrong.