this post was submitted on 18 Oct 2025
65 points (98.5% liked)
Linux
59143 readers
443 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The rule of thumb is that you want at least the same amount of ram that you have (plus a little more just in case) if you have a laptop or similar where you're going to use hibernate, since that works by moving whatever is in the ram into the swap.
Also, note that swap is basically emergency (and slow) ram. You want enough to handle any emergencies. Although I think it gets used before ram fills up completely. There are a lot of uses of ram where swap works just as well. Like if you got a program and/or browser tabs open in the background that you're not presently using, it needs somewhere to store that data. And don't forget about all the programs you may use that handle or process large files. Typically that gets loaded into ram (or direct to swap if fast access isn't needed), and if ram can't hold it, something that is used less is moved to swap.
But if there is no room, it keeps trying any way and it all freezes up like what op describes.
So... since people often have 16 gigs of ram in their machines, no, that isn't a huge amount of swap to have. Even on my desktops I generally have at least 32 gigs swap just because I often do things that fill up a lot of ram. One of them has 64 gigs ram, and it can fill a good chunk of the swap as well if I try to render something heavy in Blender. Add on to that, I may have a vm open as well. That often uses swap along with filling ram. And of course general web use where it is normal to keep several tabs constantly open.
I want to make sure I have more swap than will ever be used. Because if it does get used, then that means it and ram is full and the computer will freeze.