Swap is useful even if you have plenty of RAM. It's better to swap out a cold file-backed page and use that page for cache instead than to pin that cold page in memory for no reason.
If your servers are at 75% CPU and start swapping you are screwed. Time to start adding servers. In this day and age you are wasting a lot of money to be sitting around waiting for swap.
"Zswap is a lightweight compressed cache for swap pages. It takes pages that are in the process of being swapped out and attempts to compress them into a dynamically allocated RAM-based memory pool. [...] Zswap is a new feature as of v3.11 [...] zswap is a work in progress and should be considered experimental."
The return of RAM Doubler!
The naming is initially confusing if you're already familiar with ZFS, especially:
"Zswap makes use of zpool for the managing the compressed memory pool"
Linux intelligently swaps out ununsed pages even if there's enough physical RAM (that is more useful as page cache).
People should stop monitoring swap usage and start monitoring the amount of page in / page out IO.
Monitoring swap usage doesn't make sense on either FreeBSD or Linux.
Going into swap in Linux isn't a problem, it's a symtom of a misconfigured / provisioned server or an unhanled application memory leak, other than that the other only things that should cause it is incorrectly configured use of shared / reserved memory.
Disk based swap should pretty much always be disabled these days and ZRAM used to incresed efficiency.
Windows 10 has had memory compression [1] for quite a while now. On the PC I am on at the moment with 100+ Chrome tabs open, I have 1.3GB compressed out of a total of 16GB.
[1] http://www.thewindowsclub.com/memory-compression-in-windows-...
It makes less sense for server workloads, where you usually don't have huge chunks of inactive memory.
I always run with no swap in AWS, especially with the newer EBS-only families.
And cause a bunch more. Have you ever had to debug a race that is only triggered when a process hits swap. Not fun at all.
Ironically, if the node had crashed for OoM, the cluster would have survived just fine.
But you can disable swap entirely by not having a swap partition/file, so I don't think that's a huge issue.
It's not just a bunch of people setting cm.swappieness to 0 is it? That behaviour changed and now prevents going into swap /ever/ where it used to mean go into swap as a last resort. Changing it to 1 fixes the issue and will act like the old behaviour or only swapping as a last result.
That's a surprising behaviour change (from the perspective of "don't break userspace"), but looks more like a "fix of previously broken behaviour" as in 0 not being able to disable swap entirely; from that perspective, using 1 makes sense.