3 ms·
zram is a good choice when data in RAM is very repetetive/compressible. Web browsers is one such load. Android apps is another good one. When that data doesn't
by kees99 23d ago
zram is a good choice when data in RAM is very repetetive/compressible. Web browsers is one such load. Android apps is another good one.
When that data doesn't compress well at all, zram is no help and traditional swap-to-storage is a better choice.
And there is a middle-ground option, zswap: swapped out pages will eventually end up on a block device, but are compressed first.
- fpoling 23d agoZram also supports a block device for pages that do not compress. So the primary advantage of zswap is that one can use its swap for hibernation while it does not work with zram.
- MrDrMcCoy 23d agoZram support for a block device is quite misleading, since there are no automatic mechanisms for enabling this. You have to build your own daemon to scan pages and take action on them. Zswap doesn't have that problem.