4 ms·
I say pfft to this. The article makes a poor case. None of this matters if you have enough memory. Hence, calling swap "emergency memory" (or poor man's ram)
by clarry 6y ago
I say pfft to this. The article makes a poor case. None of this matters if you have enough memory. Hence, calling swap "emergency memory" (or poor man's ram) is perfectly justified.
If you can honestly answer "How much swap do I need, then?", and the answer is not infinite, then you can just add that amount of RAM instead of swap and be done with it, no need for swap, unless you want to prepare for emergency.
"Ideally you should have enough swap to make your system operate optimally at normal and peak (memory) load." Ideally you should have enough memory to make your system operate optimally at normal and peak memory load. In a perfect world, everything would fit in CPU's SRAM and you wouldn't even need DRAM..
- cesaref 6y agoAgreed, if you can size it, you can specify the right memory for a host for an app. There are plenty of situations where you've got dedicated hardware and a suitable budget and you can do size the hardware correctly. If however you have something like kubernetes, your apps move across hosts, you have memory scaling with use (e.g connections) and you have no idea what the load on the app will be, it becomes basically impossible to right-size the memory so other strategies come into play. Monitoring becomes king at that point.
- clarry 6y agoAnd if you can't size it, you can't size swap either so yeah.. monitor and then do what you need to do.
- throwaway2048 6y agoIf your workload cant fit in memory, without special measures such as optane swap storage you will have such crushing unresponsiveness even with something like SSDs that it is entirely not worth the hassle in 99% of cases, no matter what your budget is.
- otabdeveloper4 6y ago> ...unless you want to prepare for emergency. On a modern desktop system 'emergency' is every day, thanks to modern Javascript and the modern web.
- clarry 6y agoSwap doesn't save you from that :( Those things need infinite ram.
- de_watcher 6y agoSwap is purely psychological. It's like a slower RAM that stops you so you can think about what you've done without actually losing your work.