4 ms·
Swap isn’t needed at all in this age. It’s just there for people who can’t afford more RAM and therefore have to resort to hacky solutions like this.
by martin_andrino 9y ago
Swap isn’t needed at all in this age. It’s just there for people who can’t afford more RAM and therefore have to resort to hacky solutions like this.
- geofft 9y agoThe article specifically lists reasons why you should enable swap when there is plenty of RAM. Can you elaborate on what part of the article's reasoning you disagree with?
- tedeh 9y agoDisk is still way cheaper than RAM, and I always add some swap space to my servers just to lessen the chance of getting ENOMEM errors if/when an unexpected or unusual workload would come along.
- majewsky 9y ago> It’s just there for people who can’t afford more RAM So I should throw away my 5-year-old notebook that's still working perfectly fine just because the RAM is soldered in? Doesn't sound like efficient resource usage (both money and rare earths).
- bogomipz 9y agoWhat an absurd statement. Do you use a laptop? I do and I'm using swap space right now. I would like to buy a laptop with 32 or 64 Gigs of RAM but I can't as most(all?) laptop makers don't ship with a memory controller that permits more than 16 Gigs of RAM. And I can afford to buy more RAM.
- cztomsik 9y agoWhat is the rule for setting swap size, or can I use just swap file just like on win/mac? (I heard it will disable hibernation then)
- warrenm 9y agoThe basic rule is `RAM + 2GB` I usually peak at 34GB, unless I have reason (like needing/wanting to enable full hibernation) to use 66GB, 130GB, etc.
- cztomsik 9y agowhat if if you increase your RAM after installing the system?
- LinuxBender 9y agoIt's a circular argument that people get into because they have the incorrect kernel settings. Even if you have 4TB of ram, someone will say to add more memory on disk. It just means the system is not configured correctly. I have 30k servers and not a single one of them has swap.
- warrenm 9y ago>I have 30k servers and not a single one of them has swap. Physical? VM? Cloud? I've never seen an environment with more than a couple carefully-tuned machines that didn't run swap on every last one
- LinuxBender 9y ago30k physical servers. 512GB to 1TB ram each.
- warrenm 9y ago>30k physical servers. 512GB to 1TB ram each. You running an AWS data center?
- LinuxBender 9y agoNot a public cloud. It does involve some private cloud visualization and containers.
- warrenm 9y ago>Swap isn’t needed at all in this age. It’s just there for people who can’t afford more RAM and therefore have to resort to hacky solutions like this. Do you have anything that back that up? Because here's a solid list of many reasons why you need/want swap. Note the several reference to kernel documentation: https://news.ycombinator.com/item?id=15952447 https://news.ycombinator.com/item?id=15952447