zswap

echo lz4 >> /etc/initramfs-tools/modules
echo lz4_compress >> /etc/initramfs-tools/modules
echo z3fold >> /etc/initramfs-tools/modules


#GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
GRUB_CMDLINE_LINUX_DEFAULT=”zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=50 zswap.zpool=z3fold”

update-initramfs -u

update-grub

log2ram…

$ echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list
$ wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
$ sudo apt update
$ sudo apt install log2ram

/etc/log2ram.conf

  • SIZE – This parameter defines how much space you want to allocate in the RAM to store log files. The default value is 40M.
  • USE_RSYNC – If you want to synchronize the contents of RAM using rsync program, just set this parameter value as true. By default, Log2ram uses “cp” command to copy contents of tmpfs to disk.
  • MAIL – This parameter is used to notify error messages. You can also disable the error system mail if there is not enough place on RAM. To disable it, simply set its value as false.
  • ZL2R – This parameter enables zram compatibility in your system. It is disabled by default. To enable this option, check this link.