Re:Raspberry Pi Zero 2 W
by oxplot on Thursday October 28, 2021 @04:58AM
(#29023898)
As for the RAM limitation, zswap is a great way to get some more RAM at cost of some CPU cycles which on the new Pi won't be an issue.
[ Parent
| on HN ]
I've been running some tests on my regular server, where it seems that zstd offers better compression ratios than the default lzo-rle. Ratios are currently at 3.7 vs 2.6 according to netdata; I've seen them as far apart as 4 vs 2. Mostly a matrix server with a big database.
zstd could be slightly slower, although according to some benchmarks, it decompresses faster.
Re:Raspberry Pi Zero 2 W
by chronogram on Thursday October 28, 2021 @06:31AM
(#29024362)
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.
Re:Raspberry Pi Zero 2 W
by AshamedCaptain on Thursday October 28, 2021 @08:53AM
(#29025481)
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