From Fedora Project Wiki
Description
Test disabling swap-on-zram permanently.
Setup
- Make sure your system has swap-on-zram installed and enabled.
How to test
- Remove the swap-on-zram default configuration:
sudo dnf remove zram-generator-defaults
Alternatively, you can override the default config file with an empty one:
sudo touch /etc/systemd/zram-generator.conf
- Reboot.
- Confirm that swap-on-zram is not active.
zramctl
should not list the/dev/zram0
device:$ zramctl
swapon
should not list this device either, only disk swap partitions:$ swapon NAME TYPE SIZE USED PRIO /dev/sda5 partition 10.4G 0B -2
The service should be marked as
inactive (dead)
:$ sudo systemctl status swap-create@zram0.service ● swap-create@zram0.service - Create swap on /dev/zram0 Loaded: loaded (/usr/lib/systemd/system/swap-create@.service; static; vendor preset: disabled) Active: inactive (dead) Docs: man:zram-generator(8) man:zram-generator.conf(5)
- Return your system back to original state (install the removed package or remove the newly created config override).
Expected Results
- After removing the default configuration, swap-on-zram should not be active and its device should not be visible in
zramctl
andswapon
commands output.