logoalt Hacker News

zamalek • today at 7:58 PM • 1 reply • view on HN

> If my understanding is correct, both ZRAM and ZSWAP write uncompressed pages to disk.

ZRAM added compressed_writeback in 7.0, it needs to be explicitly enabled.


Replies

jmakov • today at 8:03 PM

Yes, but if a 4k page compresses to 1k, a 4k block on the disk still gets used: 1k + 3k of zero padding. Meaning if 100GB of data compresses 5:1, 100GB needs to be written to the disk instead of 20GB.