logoalt Hacker News

AnotherGoodNametoday at 1:48 AM2 repliesview on HN

16gb.

Fwiw you’ll see technical reasons for swap being a bad idea on servers. These are valid. Virtualised servers don’t really have great ways to make swap work.

On a personal setup though there’s no reason not to have swap space. Your main ram gets to cache more files if you let the os have some space to place allocated but never actually used objects.

As in ‘I don’t use swap because i don’t use all my ram’ isn’t valid since free ram caches files on all major OS’s. You pretty much always end up using all your ram. Having swap is purely a win, it lets you cache even more.


Replies

fluoridationtoday at 2:00 AM

But then you're putting data that used to be on RAM on storage, in order to keep copies of stored data on RAM. Without any advance knowledge of access patterns, it doesn't seem like it buys you anything.

fullstoptoday at 1:59 AM

Having everything in RAM might also be better for security, unless you're encrypting the swap partition.

The contents of swap could be read after a power cut.