From Fedora Project Wiki

Revision as of 01:21, 29 June 2020 by Chrismurphy (talk | contribs) (initial writeup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Test installation zram-generator and zram-generator-defaults (default enabled)


How to test

  1. Recommend removing 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
  2. Install zram-generator and its defaults package:
    sudo dnf install zram-generator zram-generator-defaults
    
  3. Reboot your machine
  4. 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]
    

    Notice that /dev/zram0 device is present and it's mounted as [SWAP].

  5. Verify that swapon lists the zram device:
    $ swapon 
    NAME       TYPE      SIZE USED PRIO
    /dev/vda1  partition 500M   0B   -2
    /dev/zram0 partition 1.4G   0B   -3
    

    Notice that /dev/zram0 is present. If you have another swap device present, like in the example above, that is not a problem.

Expected Results

  1. The zram-generator and zram-generator-defaults are installed without issues, and the feature is automatically activated after a reboot with the proper size. It should have a size equal to 50% of installed memory, or 4GiB, whichever is smaller.