WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: zswap-vs-zram-when-to-use-what  (Read 2079 times)

Offline nick65go

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1038
zswap-vs-zram-when-to-use-what
« on: April 16, 2026, 07:22:03 AM »
main article here : https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html

and some user summary here:
https://www.phoronix.com/forums/forum/software/distributions/1624087-kde-linux-hardening-their-os-against-updates-making-systems-unbootable#post1625266
" Here's a TL;DR (my understanding):
zswap is preferable in almost every situation. ZRAM only somewhat works in specific cases, like embedded or Android. For ZRAM to work, you must NOT have a disk swap, and need a usespace OOM killer, otherwise, you'll have very bad time when it starts to fill. Fedora and Android, notably, use ZRAM, because they made the decision to completely eliminate disk swap, which meant that zswap just was not an option, so they made sure to minimize the issues that come with ZRAM (read the blog for details). With that said,zswap is said to be receiving a disk-free mode down the line, making ZRAM completely obsolete, and so it's receiving less and less support.

In conclusion, zswap is a MUCH safer, and often better (performance and stability) option, but if you have specific constraints (completely avoiding swap), you can use ZRAM on desktop, but must be extremely careful, and even that only untill zsawp gets the feature to work without disk swap itself."




Offline neonix

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 631
Re: zswap-vs-zram-when-to-use-what
« Reply #1 on: Today at 05:24:25 AM »
According to this article
https://chrisdown.name/2026/03/24/zswap-vs-zram-when-to-use-what.html
Fedora use all RAM that is in the system. I use this strategy and set more RAM than tinycore allocate during boot. Effect is better that standard. I don't think I can double RAM space, but I can delay moment when kernel start to kill programs.
 
Quote
tce-load -i util-linux
sudo swapoff /dev/zram0
sudo zramctl --reset /dev/zram0
sudo zramctl --find --size 2G
sudo mkswap /dev/zram0
sudo swapon /dev/zram0

According to this article you can even create ext2 compressed ramdisk.
https://karelzak.blogspot.com/2014/08/zramctl.html

Implementation of zram in TinyCoreLinux is very bad in my opinion, we can achieve better results if we experiment with differen configuration options.

Offline nick65go

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1038
Re: zswap-vs-zram-when-to-use-what
« Reply #2 on: Today at 12:24:58 PM »
Implementation of zram in TinyCoreLinux is very bad in my opinion, we can achieve better results if we experiment with differen configuration options.
For CachyOS (arch x86_64-v3) for my 32 GB RAM, by default is full RAM as ZRAM.
I would be more careful with final/strong conclusions in TinyCore.
It depends on which people/hardware TC is addressing. A question I asked long time ago but was not answered by TC developers/users, even today. Like CPU/RAM/HDD specs on average.