4 ms·
Better than turning it off, on Linux try to use vm.overcommit_memory It will give you the option of swap when OOM would otherwise kill process, but you can dec
by devereaux 8y ago
Better than turning it off, on Linux try to use vm.overcommit_memory
It will give you the option of swap when OOM would otherwise kill process, but you can decide exactly how much, to prevent swapping from hurting performance -- say have a 10% extra.
Assuming you have a significant number of identical servers, turning off swap should be reserved for after you have done your tuning of the daemons and their memory use, and you are confident nothing will run out (still, you should monitor dmesg) to maximize bang for bugs.
If however you need swap a good old trick- don't put the swap on LVM or RAID. Just have separate partition on each physical device. The kernel will always know to use them in parallel, and you get to squeeze out a bit of extra performance