I'm brand new to zram, but here's my notes on it, and what I did. Adjust the "Percent" to your liking, use whatever method you prefer to achieve the following.@Dude Guyman
well said....I interested in using zram... What's involved beyond the install ?... Do I have to set-up a config file to use it as a swap file replacement ? After the install how can I find out if it is functioning as a swap replacement ?
For the guy about to say, "You should never use a GUI text editor when blah blah blah". I know. I should not turn off password prompts either, but I do! Do it however you like, this is just me showing what I did...make your own "adjustments".
I disabled the swapfile, then removed it from "fstab", then deleted it. Then installed "zram-tools", turned it off (it fires up as soon as installed), configured it to 10 percent, and turned it back on. Profit...well, I'm still waiting on that last part.
Code:
Requires systemd----------------1. Disable active swaps:$ sudo swapoff --all2. Fstab:Check/remove if any swap devices exist in fstab:$ grep swap /etc/fstab$ sudo -i mousepad /etc/fstab3. Install:$ sudo apt install zram-tools4. Stop zramswap (required a reboot for effect if memory serves me):$ sudo zramswap stop5. Configure (there is info written in the config file about which compression, etc.):$ sudo -i mousepad /etc/default/zramswapALGO=lz4PERCENT=10SIZE=512PRIORITY=1006. Start:$ sudo zramswap start7. Check:$ sudo zramctl$ cat /proc/meminfoCode:
$ sudo zramctlNAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT/dev/zram0 lz4 3.1G 4K 64B 20K 8 [SWAP]$ cat /proc/meminfoMemTotal: 32800156 kBMemFree: 30737048 kBMemAvailable: 31148856 kBSwapCached: 0 kBSwapTotal: 3280012 kBSwapFree: 3280012 kB#other stuff edited out for brevity...Statistics: Posted by Dude Guyman — 2025-12-31 20:05