memory

The memory test evaluates the functionality of the main RAM of your system. You can run this test to verify that the host under test (HUT) meets the minimum memory requirements. It also confirms that the HUT operates correctly under heavy memory loads.

What the memory test covers

The memory test is used to test system RAM. It does not test USB flash memory, SSD storage devices, or any other RAM-based hardware. It tests main memory only.

A memory per CPU core check has been added to the planning process. It verifies that the HUT meets the RHEL minimum memory requirements. It is a planning condition for several hardware certification tests.

These include memory, core, realtime, and all full-virtualization tests. If the memory per CPU core check fails, these tests are not planned automatically. However, you can plan these tests manually by using the CLI.

RHEL version supported
  • RHEL 8
  • RHEL 9
  • RHEL 10
What the test does

The test uses the file /proc/meminfo to determine how much memory is installed in the system. Once it knows how much is installed, it checks to see if the system architecture is 32-bit or 64-bit. Then it determines if swap space is available or if there is no swap partition.

The test runs once or twice, with slightly different settings, depending on whether the system has a swap file:

  1. If swap is available, allocate more RAM to the memory test than is actually installed in the system. This forces the use of swap space during the run.
  2. Regardless of swap presence, allocate as much RAM as possible to the memory test while staying below the limit that would force out of memory (OOM) kills. This version of the test always runs.

    In both iterations of the memory test, malloc() is used to allocate RAM. The RAM is then dirtied with a write of an arbitrary hex string (0xDEADBEEF). A test then verifies that 0xDEADBEEF is stored in RAM at the expected addresses.

The test calls free() to release RAM when testing completes. Multiple threads or processes allocate the RAM. The choice depends on whether the process size is greater or less than the amount of memory being tested.

Preparing for the test
Install the correct amount of RAM in the system in accordance with the rules in the Policy Guide.
Running the test

The memory test is non-interactive. Run the following command and then select the appropriate memory test name from the list that displays.

 rhcert-run
Run time, bare-metal

The memory test takes about 16 minutes on a 2013-era, single-CPU, 6-core/12-thread 3.3GHz Intel workstation with 8GB RAM. This workstation runs Red Hat Enterprise Linux, AMD64 and Intel 64.

The test takes longer on systems with more RAM. The required supportable test adds about a minute to the overall run time.

Run time, full-virt guest

The fv_memory test takes slightly longer than the bare-metal version, about 18 minutes, to run in a guest. The added time is due to guest startup/shutdown activities and the required supportable test that runs in the guest. The required supportable test on the bare-metal system adds about a minute to the overall run time.

The fv_memory test run times vary less from machine to machine than the bare-metal memory tests. This consistency occurs because the amount of RAM assigned to the pre-built guest is always the same.

There is variations caused by the speed of the underlying real system. However, the amount of RAM in use during the test do not change from machine to machine.

Creating and Activating Swap for EC2

Partners can perform the following steps to create and activate swap for EC2.

sudo dd if=/dev/zero of=/swapfile bs=1M count=8000
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon -s
edit file /etc/fstab and add the following line:
/swapfile swap swap defaults 0 0
write file and quit/exit