https://chrisdown.name/2018/01/02/in-defence-of-swap.html is worth a read - TL;DR the kernel used (pre 4.0) to be awful about swap, but modern kernels use it to avoid paging executable (file-backed) pages in low memory. If any paging is needed, lack of swap means that the kernel will page out active code before it gets as far as an OOM kill, resulting in a longer time to recover from memory contention (regardless of whether there's an OOM kill or the system recovers naturally). Further, a sensible amount of swap (say 2 GiB or so) means that unused anonymous pages (e.g. data that's left over from initialization, or data that will only be needed when a process exits) can be swapped out and left on disk, freeing up valuable RAM for useful work. Basically, a sane amount of swap is healthy - old advice about large amounts of swap is not.
|
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx