From Fedora Project Wiki

(Created page with "{{QA/Test_Case |description=Verify that SwapOnZRAM feature gets installed and activated properly. |actions= <ol> <li> Install `zram-generator`: <pre>sudo dnf install zram-gen...")
 
(this becomes the (disabled by default) test case)
Line 1: Line 1:
{{QA/Test_Case
{{QA/Test_Case
|description=Verify that SwapOnZRAM feature gets installed and activated properly.
|description=Test installation zram-generator only (default disabled)


|actions=
|actions=
<ol>
<ol>
<li> 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.
<pre>sudo dnf remove anaconda zram</pre>
<li> Install `zram-generator`:
<li> Install `zram-generator`:
<pre>sudo dnf install zram-generator
<pre>sudo dnf install zram-generator
sudo cp /usr/share/doc/zram-generator/zram-generator.conf.example /etc/systemd/zram-generator.conf
</pre>
<li> Edit `/etc/systemd/zram-generator.conf` and set these values:
<pre>[zram0]
memory-limit = none
zram-fraction = 0.5
</pre>
</pre>
<li> 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.
<pre>sudo dnf remove anaconda zram</pre>
<li> Reboot your machine
<li> Reboot your machine
<li> Verify that swap-on-zram is active:
<li> Verify that swap-on-zram is *not* active.
<pre>$ zramctl  
<pre>$ zramctl  
NAME      ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
$ swapon
/dev/zram0 lzo-rle      1.4G  4K  74B  12K      2 [SWAP]
</pre>
Notice that `/dev/zram0` device is present and it's mounted as `[SWAP]`.
<li> Verify that `swapon` lists the zram device:
<pre>$ swapon  
NAME      TYPE      SIZE USED PRIO
NAME      TYPE      SIZE USED PRIO
/dev/vda1  partition 500M  0B  -2
/dev/vda1  partition 500M  0B  -2
/dev/zram0 partition 1.4G  0B  -3
</pre>
</pre>
Notice that `/dev/zram0` is present. If you have another swap device present, like in the example above, that is not a problem.
Everything should look like it usually does, because zram-generator isn't enabled by default.
<li> 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?'''
</ol>
</ol>


|results=
|results=
# The `zram-generator` is installed without issues, and after a config file creation, it is automatically activated after a reboot.
# The `zram-generator` is installed without issues, and is not activated after a reboot.
}}
}}


[[Category:Test Days Test Cases]]
[[Category:Test Days Test Cases]]

Revision as of 01:05, 29 June 2020

Description

Test installation zram-generator only (default disabled)


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:
    sudo dnf install zram-generator
    
  3. Reboot your machine
  4. Verify that swap-on-zram is *not* active.
    $ zramctl 
    $ swapon
    NAME       TYPE      SIZE USED PRIO
    /dev/vda1  partition 500M   0B   -2
    

    Everything should look like it usually does, because zram-generator isn't enabled by default.

Expected Results

  1. The zram-generator is installed without issues, and is not activated after a reboot.