6 ms·
Yeahna, thats just memory exhaustion. Swap helps you use ram more efficiently, as you put the hot stuff in swap and let the rest fester on disk. Sure if you o
by KaiserPro 1y ago
Yeahna, thats just memory exhaustion.
Swap helps you use ram more efficiently, as you put the hot stuff in swap and let the rest fester on disk.
Sure if you overwhelm it, then you're gonna have a bad day, but thats the same without swap.
Seriously, swap is good, don't believe the noise.
- gchamonlive 1y agoIt's good, and Aws shouldn't disable it by default, but it won't save the system from OOM.
- matt-p 1y agoI bet there's a big "burns through our SSDs faster" spreadsheet column or similar that caused it to be disabled.
- gchamonlive 1y agoMaybe. Or maybe it's an arbitrary decision. Many won't enable swap. For some swap wouldn't help anyways, but others it could help soak up spikes. The latter in some cases will upgrade to a larger instance without even evaluating if swap could help, generating AWS more money. Either way it's far-fetched to derive intention from the fact.
- adastra22 1y agoI don’t understand. If you provision the system with enough RAM, then you can for every page in RAM, hot or not.
- akvadrako 1y agoOnly if you have more RAM than disk space, which is wasteful for many applications.
- adastra22 1y agoRunning out of memory kills performance. It is better to kill the VM and restart it so that any active VM remains low latency. That is my interpretation of what people are saying upthread, at least. To which posters such as yourself are saying “you still need swap.” Why?
- eru 1y agoRAM costs money, disk space costs less money. It's a bit wasteful to provision your computers so that all the cold data lives in expensive RAM.
- adastra22 1y agoWhen building distributed systems, service degradation means you’ll have to provision more systems. Cheaper to provision fewer systems with more RAM.
- eru 1y agoIt depends on what you are doing, and how your system behaves. If you size your RAM and swap right, you get no service degradation, but still get away with using less RAM. But when I was at Google (about a decade ago), they followed exactly the philosophy you were outlining and disabled swap.
- fluoridation 1y ago>It's a bit wasteful to provision your computers so that all the cold data lives in expensive RAM. But that's a job applications are already doing. They put data that's being actively worked on in RAM they leave all the rest in storage. Why would you need swap once you can already fit the entire working set in RAM?
- eru 1y agoSure, some applications are written to manually do a job that your kernel can already do for you. In that case, and if you are only running these applications, the need for swap is much less.