Skip to content

Comment on Raspberry Pi Zero 2 Wparent

Comments

zram*

zram is the compress-in-memory like you have in Windows and ChromeOS and zswap is the compress-on-disk in case you want to replace SD cards.

zswap does not compress-on-disk either (I wish it did). The difference is just an implementation detail into how both plug into the kernel but the goal is the same on both.

zram is a compressed ram-disk that acts like any other block device, so you can point `mkswap` and `swapon` at it.

zswap is a compressed (memory) cache that uses the frontswap API to evict least recently used pages to a swap device. Evicted pages are not compressed.

zram is more of a general purpose component; whereas zswap is a more specialized component.

https://www.kernel.org/doc/Documentation/blockdev/zram.txt https://www.kernel.org/doc/html/latest/vm/zswap.html

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.