If theres a better explanation for why swap is useful, I'd like to hear it, but the article is unconvincing.
If theres a better explanation for why swap is useful, I'd like to hear it, but the article is unconvincing.
I have stopped using swap on all my servers, desktops and laptops about 20 years ago.
I have never encountered any situation when swap could have been useful, but I have always installed generous quantities of RAM on all computers.
As long as the quantity of used memory does not exceed the physical memory, swapping pages cannot improve the performance in any way.
The only exception, which is mentioned in the parent article, is when some very seldom used memory pages would be swapped and the freed memory would be used as a disk cache, hopefully increasing the performance for a I/O bound application.
Whether this strategy of hoping that a larger disk cache, filling all the available physical memory, can improve the performance more than what can be lost if the prediction that the swapped pages will not be needed soon is wrong, is extremely application dependent.
This hypothesis, that a significant performance improvement can be enabled by a slightly larger disk cache, might happen to be true in certain cases on computers which still use slow HDDs.
Except for backup/archiving, where the disk cache matters very little, I have not used HDDs for more than a decade.
On computers with SSDs, the chances to find an application where a small increase in disk cache size can cause a noticeable performance increase, larger that what is lost by swapping the seldom used memory pages, are negligible, in my opinion.