Using zram and zswap in Linux

Описание к видео Using zram and zswap in Linux

In this video I describe the differences between zram and zswap, their use cases, and how to set them up.

Support the channel:
BTC - 3NzWDDH3n5PsBKqWJyAb7rvsGvJKxcAPFv
ETH - 0xB09212235c648a448F0E7eEB416ce5652362c772

Follow me:
SecureRandom on YouTube -
   / @securerandom5420  

SecureRandom on LBRY / Odysee -
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”

Комментарии

Информация по комментариям в разработке