Verify that SwapOnZRAM feature gets installed and activated properly.
How to test
sudo dnf install zram-generator sudo cp /usr/share/doc/zram-generator/zram-generator.conf.example /etc/systemd/zram-generator.conf
/etc/systemd/zram-generator.confand set these values:
[zram0] memory-limit = none zram-fraction = 0.5
- Optionally remove the following packages. The swap-on-zram implementations in those packages have minor conflicts with
zram-generator, but mostly they'll just contribute to user confusion.
sudo dnf remove anaconda zram
- Reboot your machine
- Verify that swap-on-zram is active:
$ zramctl NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT /dev/zram0 lzo-rle 1.4G 4K 74B 12K 2 [SWAP]
/dev/zram0device is present and it's mounted as
- Verify that
swaponlists the zram device:
$ swapon NAME TYPE SIZE USED PRIO /dev/vda1 partition 500M 0B -2 /dev/zram0 partition 1.4G 0B -3
/dev/zram0is present. If you have another swap device present, like in the example above, that is not a problem.
- If your zram device doesn't have the highest priority (like in the example above), we need to make it as the top priority swap. FIXME HOW. Or we can deactivate the other device temporarily, is that a better approach?
zram-generatoris installed without issues, and after a config file creation, it is automatically activated after a reboot.