

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.




Removed by mod