RE: https://c.im/@lwnbot/116284493258223180

Nice reading although I still use zram for most.

#linux #zram #zswap

Ah, the classic "Let me explain why you're wrong about #zswap and zram" rant, complete with obligatory self-promotion links. 🙄 Who knew compressing RAM could be so controversial? But hey, if you need more jargon in your life, this blog's got you covered. 💻🎉
https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html #zram #RAMcompression #techrants #selfpromotion #HackerNews #ngated
Debunking zswap and zram myths

zswap and zram are fundamentally different approaches with different philosophies. If in doubt, use zswap.

Debunking zswap and zram myths

zswap and zram are fundamentally different approaches with different philosophies. If in doubt, use zswap.

zswap - ArchWiki

TIL about #zswap "a compressed write-back cache for swapped pages, as a form of virtual memory compression". this will hopefully came in handy soon for performance :)
also there are zram and zcache (https://askubuntu.com/a/472227 has a comparison)
zram vs zswap vs zcache Ultimate guide: when to use which one

What the hell are they? How are they different (I've written my understanding in an answer below) In the Zswap system, when a page is evicted from the zswap to the actual swap is it stored in a

Ask Ubuntu

According to LWN kernel source DB, the number of my Linux mainline commits exceeded 1,000 with 6.19-rc1. It feels like a moment to me.

Most commits were made for DAMON, but the 1,000-th commit was for zswap ;)

$ git log --oneline --author "SeongJae" | grep damon | wc -l 872 $ nr=0; for c in $(git log --pretty=%h --reverse --author "SeongJae"); do nr=$((│[43] [PATCH v3] mm/damon/sysfs-schemes: Remove outdated TODO in target_nid_store() (Swaraj nr + 1)); if [ "$nr" -eq 1000 ]; then git log "$c" -1 --pretty="%h %s"; fi; done 0fdaa13ee93a Docs/admin-guide/mm/zswap: s/red-black tree/xarray/

#linux #kernel #damon #zswap

Why don't Linux distributions enable zswap or zram by default, especially when swap space is on an SSD?
#linux #ram #computermemory #swapspace #zswap #zram #ramcompression #swapcompression #ssd #flashstorage

interesting discussion on the odd fact that in Linux we have #zram aka #zramswap (compressed swap in memory) and #zswap (compressed swap buffer in memory which decompresses the data before evicting it to a disk-based backing store if memory is getting low enough), without having simple compressed swap on disk:

https://unix.stackexchange.com/questions/740334/how-to-compress-disk-swap

How to compress disk swap

I am looking for a way to compress swap on disk. I am not looking for wider discussion of alternative solutions. See discussion at the end. I have tried... Using compressed zfs zvol for swap is NOT

Unix & Linux Stack Exchange

Very good write up on #zswap and #zram. These things have such good improvements in general.

Not always is more ram feasible either. 😅 Looking at you gddr5 😒

https://linuxblog.io/zswap-better-than-zram/

I was wrong! zswap IS better than zram

Rule of thumb / TL;DR:If your system only uses swap occasionally and keeping swap demand within ~20–30% of your physical RAM as zram is enough, ZRAM is

LinuxBlog.io

Recently, I've been experiencing some lag (ie. opening Ghostty terminals) when browsing, playing RuneScape, and watching YouTube videos (all at the same time) on my Ubuntu laptop.

At first, I thought it could be due to the overhead of snaps (both Ghostty and Epiphany, my browser, are snaps), but after some monitoring with HTOP, I realized that I was using a lot of memory... particularly when watching YouTube videos in Epiphany and playing RuneScape at the same time. In fact, I was using so much memory I was hitting swap.

I didn't think this should have been a huge deal, however, because I had enabled zswap with lz4 compression (Ubuntu does not appear to support zstd). After looking at the parameters under /sys/module/zswap/parameters/, however, I noticed that my zpool was zbud, which is the default on Ubuntu.

Well it turns out that zbud... is not very effective and is in fact being deprecated:

https://www.spinics.net/lists/kernel/msg5527878.html

I decided to switch over to zsmalloc with the following in my /etc/default/grub:

GRUB_CMDLINE_LINUX="zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=25 zswap.zpool=zsmalloc"

With this change, zswap appears to be much more effective and I have not experienced as much (if any) lag in terms of being able to open up Ghostty terminals while browsing, playing RuneScape, and watching YouTube videos.

#ubuntu #zswap