by rollcat · 6y ago · 0 comments
I had a better / more elaborate explanation bookmarked somewhere but can't find it now, the tldr is a "modern" OS (past ~2-3 decades) wants the freedom to manage anonymous (malloc) and named (mmio) memory between physical RAM and disk devices. Disabling swap means the OS must always keep the anonymous pages in physical RAM, which negatively impacts any IO-bound workload (can't cache) and, ironically, puts more pressure on the disk.
So unless you have an extremely specific and finely tuned use-case with lots of benchmark data, the OS will almost always make a better call.
I have been running swapless for two decades without any issue.
* http://jdebp.uk./FGA/dont-throw-those-paging-files-away.html