@jpmens 2020 and people still misunderstand swap, mostly because of how awful the Linux memory management has been in the past leading to rumors and misconceptions by those who have never seen a unix kernel that does it correctly

@feld @jpmens I've been running Linux since 1995 as my primary operating system and in a server context in data centers. Yet, I turn swap off. The performance gain on contemporary computers is measurable, at least for interactive applications.

@feld @jpmens Finally, again, for interactive applications, I strongly desire OOM to happen sooner, rather than later. Nothing sucks more than a computer frozen so hard that you need to hard-reboot it to regain control.

Swap has its place, but it's becoming more and more specialized, I think.

@feld @jpmens If the paging architecture has been overhauled to such an extent that it's basically brand new, I'll give using swap another go. Until then, ..., not on my box.

@vertigo @jpmens yeah, it has. The point of swap is for idle memory of applications not being used. It relieves pressure for applications that need it. And if the vm scheduler is good like on non-Linux platforms you will never end up blocked due to paging

@feld @jpmens Thanks; this is good news. However, even with recent versions of the kernel, I still find swap off to be more usable; ironically, with greatest impact on resource constrained systems, like Raspberry Pi.

I think shoddy memory management practices need to be called out. As the article writes no fewer than twice in bold letters, memory contention is the primary cause for poor performance on both swap-enabled and swap-disabled systems.

@jpmens I tend to set up a 1GB or less swapfile and set zswap.enabled=1 on the kernel command line. lzo/lz4 are quite fast in RAM, and this reduces disk I/O if you ever do have to use it.

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!