this post was submitted on 06 Jan 2026
65 points (98.5% liked)

Linux

11022 readers
394 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] HappyFrog@lemmy.blahaj.zone 11 points 5 days ago (5 children)

But how much swap should I use?

[–] towerful@programming.dev 4 points 5 days ago

What I'd recommend is setting up a few testing systems with 2-3GB of swap or more, and monitoring what happens over the course of a week or so under varying (memory) load conditions. As long as you haven't encountered severe memory starvation during that week – in which case the test will not have been very useful – you will probably end up with some number of MB of swap occupied.

And

[... On Linux Kernel > 4.0] having a swap size of a few GB keeps your options open on modern kernels.

And finally

For laptop/desktop users who want to hibernate to swap, this also needs to be taken into account – in this case your swap file should be at least your physical RAM size.

load more comments (4 replies)