From Fedora Project Wiki
Description
Test disable swap-on-zram right now!
How to test
- swap-on-zram should be enabled and running to start this test.
- Turn off swap-on-zram:
sudo systemctl stop swap-create@zram0
- Confirm it's stopped:
sudo systemctl status swap-create@zram0 ● 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) since Sun 2020-06-28 19:32:07 MDT; 3s ago Docs: man:zram-generator(8) man:zram-generator.conf(5) Process: 646 ExecStart=/usr/lib/systemd/system-generators/zram-generator --setup-device zram0 (code=exited, status=0/SUCCESS) Process: 1565 ExecStop=/usr/lib/systemd/system-generators/zram-generator --reset-device zram0 (code=exited, status=0/SUCCESS) Main PID: 646 (code=exited, status=0/SUCCESS) CPU: 25ms Jun 28 19:24:57 fmac.local systemd[1]: Starting Create swap on /dev/zram0... Jun 28 19:24:57 fmac.local zram-generator[648]: Setting up swapspace version 1, size = 3.8 GiB (4105170944 bytes) Jun 28 19:24:57 fmac.local zram-generator[648]: no label, UUID=03831cdf-96df-4a7a-a6c2-3bc8406f33f3 Jun 28 19:24:57 fmac.local systemd[1]: Finished Create swap on /dev/zram0. Jun 28 19:32:07 fmac.local systemd[1]: Stopping Create swap on /dev/zram0... Jun 28 19:32:07 fmac.local systemd[1]: swap-create@zram0.service: Succeeded. Jun 28 19:32:07 fmac.local systemd[1]: Stopped Create swap on /dev/zram0. [chris@fmac ~]$ zramctl [chris@fmac ~]$ swapon NAME TYPE SIZE USED PRIO /dev/sda5 partition 10.4G 0B -2
- Optional: Set it back to running, and confirm.
sudo systemctl start swap-create@zram0 [chris@fmac ~]$ sudo systemctl status swap-create@zram0 ● swap-create@zram0.service - Create swap on /dev/zram0 Loaded: loaded (/usr/lib/systemd/system/swap-create@.service; static; vendor preset: disabled) Active: active (exited) since Sun 2020-06-28 19:32:54 MDT; 3s ago Docs: man:zram-generator(8) man:zram-generator.conf(5) Process: 1580 ExecStart=/usr/lib/systemd/system-generators/zram-generator --setup-device zram0 (code=exited, status=0/SUCCESS) Main PID: 1580 (code=exited, status=0/SUCCESS) CPU: 33ms Jun 28 19:32:54 fmac.local systemd[1]: Starting Create swap on /dev/zram0... Jun 28 19:32:54 fmac.local zram-generator[1582]: Setting up swapspace version 1, size = 3.8 GiB (4105170944 bytes) Jun 28 19:32:54 fmac.local zram-generator[1582]: no label, UUID=f046c6d8-3f69-4f21-81ae-a7b1555891d9 Jun 28 19:32:54 fmac.local systemd[1]: Finished Create swap on /dev/zram0. $
Expected Results
- Status should be inactive (dead).
- There should be no /dev/zram0 device listed for the
zramctl
andswapon
commands.