almost 80 different stress tests
over 50 CPU specific stress tests that exercise floating point, integer, bit manipulation and control flow
over 20 virtual memory stress tests
stress-ng was originally intended to make a machine work hard and trip hardware issues such as thermal overruns as well as operating system bugs that only occur when a system is being thrashed hard. Use stress-ng with caution as some of the tests can make a system run hot on poorly designed hardware and also can cause excessive system thrashing which may be difficult to stop.
stress-ng can also measure test throughput rates; this can be useful to observe performance changes across different operating system releases or types of hardware. However, it has never been intended to be used as a precise benchmark test suite, so do NOT use it in this manner.
Running stress-ng with root privileges will adjust out of memory settings on Linux systems to make the stressors unkillable in low memory situations, so use this judiciously. With the apropriate privilege, stress-ng can allow the ionice class and ionice levels to be adjusted, again, this should be used with care.
One can specify the number of processes to invoke per type of stress test; specifying a negative or zero value will select the number of online processors as defined by sysconf(_SC_NPROCESSORS_ONLN).
Install stress-ng on ubuntu
Open the terminal and run the following command
sudo apt-get install stress-ng
stress-ng [OPTION [ARG]] ...
CPU specific stress methods
These can be specified using the --cpu-method option
stress-ng --cpu 4 --io 2 --vm 1 --vm-bytes 256M --timeout 60s
stress-ng --cpu 8 --cpu-ops 800000
stress-ng --cpu 4 --io 2 --timeout 60s --metrics
VM specific stress methods
These can be specified using the --vm-method option
stress-ng --vm 32 --vm-bytes 64M --vm-stride 1K --vm-populate --page-in --metrics-brief --times --timeout 60s
stress-ng --fork 4 --fork-ops 100000
stress-ng --all 4 --timeout 5m
stress-ng --random 64
Check Stress-NG documentation for more details.
Source from Here