4 ms·
I'd like to see some differentiation between a server and a desktop, since the correct answer varies wildly. On app servers I'll often do no swap because I don
by freedomben 8y ago
I'd like to see some differentiation between a server and a desktop, since the correct answer varies wildly.
On app servers I'll often do no swap because I don't want the performance hit of an unexpected swap. I have real time memory monitoring and self-healing in place to prevent OOM. On a bastion server that isn't handling user traffic I probably will add a swap so I can get by with lower total memory on the box, and have a buffer before the OOM killer starts hacking away.
On desktop I'll often have a large swap that's there mostly so I don't get to that horrible locking hell when the OOM killer starts mercilessly hacking processes I care about while leaving ones I don't alive. This gives me time to handle it myself. Also I may want to hibernate.
So tl;dr: the rules all change depending on what the box is used for. Asking this question generally is like saying, "what should the towing capacity of my car/truck be?" Well the next question is: what are you towing? do you care about fuel efficiency, etc.