Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd like to see Linux gain support for actual memory compression, without the need to go through zram, similar to macOS/Windows.


zram has been "obsolete" for years, I don't know why people still reach for it. Linux supports proper memory compression in the form of zswap

https://wiki.archlinux.org/title/Zswap


I didn't realize zswap also uses in-memory compression. It might be a combination of poor naming and zram being continuously popular.


It is not obsolete. It's also useful for other things.


Because I'd rather compress ram when running low on memory rather than swapping to my disks. zram is also default on some distros (e.g. Fedora).


Did you read the link? Additional disk swap is optional, and if for some reason you would still like to have one, it's easy to disable writeback, using just the RAM.

And even if one enables zswap and configures nothing else, compressing RAM and only swapping out to disk under extreme pressure is still the default behavior.


> Additional disk swap is optional

Where did you read that?

My experience has been that not only in reality the pool size is limited by the amount of swap space you've allocated, it's also uncompressed again when offloaded there which is ridiculous when you think about it.


I use zswap, which is a non-fixed intermediate layer between RAM and swap and worked great on my old laptop which had a max of 4GB RAM. Even use it now on my current 32GB laptop.

Full compression would be nicer, but I'd also like to see ECC emulation (or alternative) as a cheaper alternative to the real hardware, although with current prices that might be less so.


zswap?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: