Zram and systemd-swap

Hi there,

I have two questions concerning zram and systemd-swap.

I read the documentation about zram here. If I understood this correctly,

mkswap /dev/zram0
swapon /dev/zram0

mkfs.ext4 /dev/zram1
mount /dev/zram1 /tmp

creates a swap and a mount for /tmp. In in order to make this permanent, is it enough to create entries in the fstab accordingly?

Second question is about system-swap. If the option swapfc_enabled=1 is enabled, there is no need for a zram or a zswap. Is this correct?

Thanks in advance,

Christoph

1 Like

No, you’ll have to create the zram devices on every boot.

That enables automatic configuration, so you don’t need to manually set up any specific swap devices.

Further reading:

4 Likes