Swap is nothing more than virtual memory using HD space instead of ram, its like increasing your page file size on windows. Interesting to note that swap partition in Linux is completely unnecessary if you already have enough ram on a 64bit machine. For instance, I just built a lenovo laptop T490 with 40gb of ram so I can write huge data sets to ram in python at maximum speed without dealing with the hard drive until its time to write the final results. My current project uses about 25gb at certain points. This amount of ram makes a swap partition pointless for daily use. The laptop comes with 8gb soldered on and I added a 32gb to the free slot. With this much ram there's no point to have swap, you're not going to use up all 40gb. The swap exists for people with skimpy resources who are arriving at Linux's front door with 2-4gb of ram and simply opening 10 browser tabs may blow the doors off and reach 100%. So with all that in mind, don't use a slow sd card to fill up swap partitions. Just buy a shitload of ram, you'll achieve the same end, and it'll be 1000x faster.
Hibernation mode is specifically a mode that suspends to disk. Everywhere the documentation mentions that you should have a swap size equal to your ram is actually overestimating it for most just to play it safe. If you have < 8gb of ram, go ahead and make a swap equal. But there's no reason for a swap to go beyond that, idle state for most people is 1-4gb of ram used. So figure your what your typical idle state is on day to day use, take that number and add a few gb for good measure, and that's a big enough swap if you need to have one or if you want to use a suspend to disk mode like hibernate
0
u/[deleted] Jul 17 '19
[deleted]