How to Run Stress Test for RAM Memory in Ubuntu, Debian, Fedora, RHEL

Got new memory sticks and want to run stress test for them? Here’s how to do the trick in Ubuntu, Linux Mint, Debian, Fedora, CentOS, RedHat and other Linux.

Step 1: Install stressapptest

Stressapptest (Stressful Application Test) is a free and open-source command line tool for memory interface test. It has been used at Google for some time and now it is available under the apache 2.0 license.

It tries to maximize randomized traffic to memory from processor and I/O, with the intent of creating a realistic high load situation in order to test the existing hardware devices in a computer.

Stessapptest is available in most Linux system repositories. First, search for and open a terminal window (or connect to command console in Linux server) from either start menu or ‘Activities’ overview depends on your DE.

Open terminal

Then, run one of the command below to install the tool:

  • For Debian, Ubuntu, Linux Mint, and their based systems, run command:
    sudo apt install stressapptest
  • For Fedora, RHEL, Rocky Linux, etc use command:
    sudo dnf install stressapptest
  • Gentoo Linux user can install the tool via command:
    sudo emerge stressaptest
  • And, openSUSE Linux can install it via:
    sudo zypper install stressapptest

And for Arch, Manjaro Linux, etc., the application is available via AUR repository.

Step 2: Run stressapptest for RAM stress test

Once you installed the tool, you can run the command below to start testing with default parameters:

stressapptest
NOTE: The stress test may cause system freeze for a short period!

It auto detects the number of your CPUs, uses all memory available, and starts stress testing for 20 seconds.

And, it outputs hardware incidents and errors if any in the output.

User can also run test with specified arguments, including:

  • -M mbytes : megabytes of ram to test
  • -s seconds : number of seconds to run
  • -m threads : number of memory copy threads to run
  • -W : Use more CPU-stressful memory copy
  • -n ipaddr : add a network thread connecting to system at ‘ipaddr’.
  • –listen : run a thread to listen for and respond to network threads.
  • -f filename : add a disk thread with tempfile ‘filename’
  • -F : don’t result check each transaction, use libc memcpy instead.

For example, allocate 4 GB (4096 MB) memory, run 4 “warm copy” threads, use more CPU-stressful memory copy, and run test for 1 hour.

stressapptest -M 4096 -m 4 -s 3600 -W

Of course if you can’t wait until the test done, press Ctrl+C will stop the process and output the result. And, you can discuss about the stress test by visiting this page.

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.