How To Install And Enable ZRamSwap (Via Systemd-Swap) On Arch Linux, Via The AUR Repository

Hello Linux Geeksters. As you may know, ZRAM is a kernel module that improves the RAM management of your Linux system. Via ZRAM, some data is moved from the RAM to the swap memory and so, the system boots faster and the usage of multiple apps at once get enhanced speed, because the free RAM space is bigger.

In this article I will show you how to install and install ZRam on Arch Linux.

Because it is available via the AUR repository, installing and enable ZRam on Arch Linux is easy. Follow the instructions exactly, in order to get a successful installation.

Download the ZRamSwap 1.1.1 tarball, from AUR:

$ wget https://aur.archlinux.org/packages/zr/zramswap/zramswap.tar.gz

Extract the archive and cd into the extracted folder:

$ tar zxvf zramswap.tar.gz
$ cd zramswap

Compile the package and install the dependencies:

$ makepkg -s

Install zramswap 1.1.1 via pacman:

$ sudo pacman -U zramswap-1-1-any.pkg.tar.xz

In order to have the zram swaps, swap files and swap partitions automatically mounted, we have to install and enable the systemd-swap.

Get systemd-swap:

$ sudo wget https://github.com/TimofeyTitovets/systemd-swap/blob/master/90-systemd-swap.conf -O /etc/modprobe.d/90-systemd-swap.conf
$ sudo wget https://github.com/TimofeyTitovets/systemd-swap/blob/master/systemd-swap.service -O /etc/systemd/system/systemd-swap.service
$ sudo wget https://github.com/TimofeyTitovets/systemd-swap/blob/master/systemd-swap.conf -O /etc/systemd-swap.conf
$ sudo wget https://github.com/TimofeyTitovets/systemd-swap/blob/master/systemd-swap.sh -O /usr/lib/systemd/scripts/systemd-swap.sh

Enable systemd-swap:

$ sudo systemctl enable systemd-swap

Liked it? Take a second to support Geekster on Patreon!
Tagged with: , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!