In this video I describe the differences between zram and zswap, their use cases, and how to set them up.
Follow me on Odysee.com
https://odysee.com/@SecureRandom:1
----------------------------------------------------
zram commands:
sudo vim /etc/modules-load.d/zram.conf
zram
sudo vim /etc/modprobe.d/zram.conf
options zram num_devices=1
sudo vim /etc/udev/rules.d/99-zram.rules
KERNEL=="zram0", ATTR{disksize}="512M",TAG+="systemd"
sudo vim /etc/systemd/system/zram.service
[Unit]
Description=Swap with zram
After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=true
ExecStartPre=/sbin/mkswap /dev/zram0
ExecStart=/sbin/swapon -p 5 /dev/zram0
ExecStop=/sbin/swapoff /dev/zram0
[Install]
WantedBy=multi-user.target
sudo systemctl enable zram
----------------------------------------------------
zswap commands:
Check if zswap is enabled / supported
cat /sys/module/zswap/parameters/enabled
sudo vim /etc/default/grub
Add “zswap.enabled=1” to the line that starts with “GRUB_CMDLINE_LINUX”
37 Comments