From Fedora Project Wiki

No edit summary
(Replaced content with "This is a dead page. Use https://fedoraproject.org/wiki/QA:Testcase_CoreOS_swap_on_zram instead.")
Tag: Replaced
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{QA/Test_Case
This is a dead page. Use https://fedoraproject.org/wiki/QA:Testcase_CoreOS_swap_on_zram instead.
|description=Install and validate Fedora CoreOS with swap on zram enabled
|setup=
# Download and verify the latest [https://getfedora.org/coreos/download?tab=metal_virtualized&stream=next FCOS <b>next</b> image] (pick the right image for your environment).
# Read background on zram [https://www.fedoraproject.org/wiki/Changes/SwapOnZRAM here].
# Figure out how you'd like to configure your initial zram device.
# Read other possible post-boot tests as described [https://fedoraproject.org/wiki/QA:Testcase_SwapOnZRAM_customconfig here].
 
|actions=
# [https://docs.fedoraproject.org/en-US/fedora-coreos/producing-ign/ Create an Ignition file].
# Configure Zram device validating instructions [https://docs.fedoraproject.org/en-US/fedora-coreos/sysconfig-configure-swaponzram/ here].
# Launch your Fedora CoreOS system using this Ignition file. See [https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/#_quickstart the Quickstart] and the provisioning docs for a guide how to launch FCOS in most environments (bare metal, virtual, cloud, etc).
 
|results=
<ol>
<li> You can SSH successfully into your FCOS system and that it is on the expected version.
<pre>
$ ssh 172.25.81.173
Fedora CoreOS 36.20220325.1.0
Tracker: https://github.com/coreos/fedora-coreos-tracker
Discuss: https://discussion.fedoraproject.org/tag/coreos
 
Last login: Mon Apr  4 14:42:45 2022 from 156.111.209.231
[core@d-zram-test-1 ~]$
</pre>
<li>Verify the zram configuration injected by ignition is as expected.
 
<pre>$ cat /etc/systemd/zram-generator.conf
<li>This config file enables a /dev/zram0 device with the default settings
[zram0]
</pre>
 
<li>Verify zram has been correctly defined as a swap partition and to the expected size
 
The default is min(ram/4,4096) which in our 16GB machine instance means 4G.
 
<pre>[core@d-zram-test-1 ~]$ zramctl --output-all
zramctl --output-all
NAME      DISKSIZE DATA COMPR ALGORITHM STREAMS ZERO-PAGES TOTAL MEM-LIMIT MEM-USED MIGRATED MOUNTPOINT
/dev/zram0      4G  4K  80B lzo-rle        4          0  12K        0B      12K      0B [SWAP]
[core@d-zram-test-1 ~]$ swapon
NAME      TYPE      SIZE USED PRIO
/dev/zram0 partition  4G  0B  100
</pre>
 
<li>Saturate memory and confirm usage via zramctl
 
<li>Initially fill memory with 15GB usage and confirm usage via top.  No swap.</li>
 
<pre>
[core@d-zram-test-1 ~]$ </dev/zero head -c 15G | tail &
[1] 1810
[core@d-zram-test-1 ~]$ sleep 5
[core@d-zram-test-1 ~]$ top -o %MEM -bn1 | head -n 15
top - 14:50:20 up 14 min,  1 user,  load average: 0.60, 0.24, 0.12
Tasks: 125 total,  3 running, 122 sleeping,  0 stopped,  0 zombie
%Cpu(s):  1.6 us,  1.6 sy,  0.0 ni, 95.2 id,  0.0 wa,  0.0 hi,  0.0 si,  1.6 st
MiB Mem :  15994.1 total,    238.0 free,  15687.3 used,    68.9 buff/cache
MiB Swap:  4096.0 total,  4068.9 free,    27.1 used.    109.9 avail Mem
 
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM    TIME+ COMMAND
  1810 core      20  0  15.1g  15.1g  1668 R  6.2  96.4  0:15.48 tail
  1466 root      20  0 1440984  15588  3844 S  0.0  0.1  0:00.27 dockerd
  1475 root      20  0 1345832  14856  2416 S  0.0  0.1  0:01.83 containerd
    773 root      20  0  58856  10444  9236 S  0.0  0.1  0:00.46 systemd-journal
  1513 root      20  0  770212  6928      0 S  0.0  0.0  0:00.16 docker-driver
    848 systemd+  20  0  23984  6688  3256 S  0.0  0.0  0:00.14 systemd-resolve
      1 root      20  0  172348  5396    848 S  0.0  0.0  0:03.69 systemd
  1759 core      20  0  19240  4480  1348 R  12.5  0.0  0:06.30 sshd
</pre>
 
<li>Now add a further 3G of usage which we expect to be fulfilled by swap and therefore zram as the prioritized device.
 
<pre>[core@d-zram-test-1 ~]$ </dev/zero head -c 3G | tail &
[2] 1815
[core@d-zram-test-1 ~]$ top -o %MEM -bn1 | head -n 15
top - 14:50:36 up 14 min,  1 user,  load average: 0.65, 0.27, 0.14
Tasks: 126 total,  1 running, 125 sleeping,  0 stopped,  0 zombie
%Cpu(s):  1.5 us,  3.1 sy,  0.0 ni, 95.4 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  15994.1 total,    189.2 free,  15760.8 used,    44.1 buff/cache
MiB Swap:  4096.0 total,  1050.6 free,  3045.3 used.    48.7 avail Mem
 
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM    TIME+ COMMAND
  1810 core      20  0  15.1g  12.1g    280 S  6.2  77.7  0:15.87 tail
  1815 core      20  0 3162560  3.0g    264 S  6.2  19.3  0:03.57 tail
  1466 root      20  0 1440984  10548      0 S  0.0  0.1  0:00.27 dockerd
  1475 root      20  0 1345832  9648  2888 S  0.0  0.1  0:01.87 containerd
  1513 root      20  0  770212  6172      0 S  0.0  0.0  0:00.17 docker-driver
  1816 core      20  0    7856  3624  2996 R  0.0  0.0  0:00.00 top
      1 root      20  0  172348  2868      0 S  0.0  0.0  0:03.69 systemd
  1760 core      20  0    6212  2004  1644 S  0.0  0.0  0:00.55 bash
[core@d-zram-test-1 ~]$ zramctl --output-all
NAME      DISKSIZE DATA COMPR ALGORITHM STREAMS ZERO-PAGES TOTAL MEM-LIMIT MEM-USED MIGRATED MOUNTPOINT
/dev/zram0      4G  3G 35.6M lzo-rle        4    381047 43.4M        0B    47.4M      57B [SWAP]
[core@d-zram-test-1 ~]$ swapon
NAME      TYPE      SIZE USED PRIO
/dev/zram0 partition  4G  3G  100
</pre>
 
<li>Verify the linked documentation makes sense, nothing is obviously missing, and the instructions are clear.
}}
 
<li>No changes required.
</ol>
 
[[Category:CoreOS Test Cases]]

Latest revision as of 16:16, 5 April 2022