Production Stress Test Documentation
This guide provides instructions for installing and running stress tests on AlmaLinux/Rocky Linux and Ubuntu systems using stress-ng.
1. Install Stress Tools On Alma/Rocky Linux
Run the following commands to install the necessary tools:
sudo dnf install epel-release -y
sudo dnf install stress-ng -y
sudo dnf install tmux -y
2. Run a Stress Test (20 Hours)
Use the following command to run a stress test for 20 hours:
stress-ng --cpu 0 --io 4 --vm 2 --vm-bytes 1G --hdd 1 --timeout 20h --metrics-brief
π What this does
-
--cpu 0: Stresses all available CPU cores. -
--io 4: Starts 4 I/O workers to create heavy I/O pressure. -
--vm 2: Starts 2 memory workers. -
--vm-bytes 1G: Allocates 1GB of RAM per vm worker (Total: 2GB). -
--hdd 1: Starts 1 HDD worker (includes disk stress, safe temp files). -
--timeout 20h: Runs the test for 20 hours. -
--metrics-brief: Outputs a clean performance summary after completion.
3. Install Stress Tools On Ubuntu
Run the following command to install stress-ng:
sudo apt install stress-ng -y
4. Run a High-Load Stress Test
This command configures a specific high-load scenario (30 cores, 30GB RAM, 20 Hours):
stress-ng \
--cpu 30 \
--vm 30 \
--vm-bytes 1G \
--io 8 \
--hdd 2 \
--timeout 20h \
--metrics-brief
π Breakdown
-
--cpu 30: Stresses 30 CPU cores. -
--vm 30: Starts 30 memory workers. -
--vm-bytes 1G: Allocates 1GB RAM per worker (Total: 30GB). -
--io 8: Starts 8 I/O workers. -
--hdd 2: Starts 2 HDD workers. -
--timeout 20h: Runs for 20 hours. -
--metrics-brief: Shows a brief summary of metrics.
Top comments (0)