Linux swap space allocation using zram

Home

Arch Linux uses zram for swap allocation when installed using archinstall script / command. This blog post helps to provide a reference on how to modify important parameters like size.

File location: /etc/systemd/zram-generator.conf

[zram0]
zram-size = ram * 2
# compression-algorithm = zstd
# swap-priority = 100
# fs-type = swap

Then restart the service to make use of the new settings:

sudo systemctl restart systemd-zram-setup@zram0.service

References used:

  1. zram - Arch Wiki
  2. zram-generator (GitHub)