On 7/31/23 00:32, Masaru Nomiya wrote:
Hello,
Please have a look;
https://www.reddit.com/r/openSUSE/comments/mfs53x/tip_enable_zram_easily/
it is written as follows;
Zram uses your CPU to compress swap which makes your PC faster
( People say it boosts the performance even though it uses your CPU ) Using Zram can reduce the read/write cycles on an SSD and increases its durability.
In adsdition from
https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/
[...] What is ZRAM?
ZRAM creates a block device in RAM where pages that would otherwise be written to swap (disk/SSD) are instead first compressed, then stored. This allows for a much faster I/O of swap, and also, the data compression provides a significant amount of memory savings.
A downside of ZRAM is that it uses some CPU for compression, but this is usually negated by the gains achieved from avoiding disk swap and the overall memory savings of compression. So keep those things in mind per your usage.
That's damn interesting. Only thing I don't get is how does adding a compression layer improve performance? I just haven't read enough yet. I can see swap/read/write benefits for systems that heavily swap - but for systems that don't swap at all - I guess there wouldn't be any benefit? Interesting enough to learn more about. It will certainly make sense for some use cases. -- David C. Rankin, J.D.,P.E.