How to Benchmark System Performance on Arch Linux
Categories:
5 minute read
Benchmarking system performance is a critical step for understanding your hardware capabilities, identifying bottlenecks, and validating system tuning or upgrades. Arch Linux, with its minimalist design and up-to-date software, is a powerful platform for performance benchmarking, especially for power users and professionals who want fine-grained control over their systems.
In this article, we’ll cover how to benchmark system performance on Arch Linux, including CPU, memory, disk I/O, GPU, and overall system responsiveness. Whether you’re testing a fresh Arch install, tuning your gaming setup, or comparing hardware changes, this guide provides the tools and techniques you’ll need.
Why Benchmark Your System?
Before jumping into tools and commands, it’s important to understand the purpose behind benchmarking:
- Performance validation after hardware changes or kernel updates
- Overclocking analysis for CPUs or GPUs
- Bottleneck identification in memory, disk, or GPU
- Power efficiency evaluation for laptops or mobile systems
- System stress testing for stability
Preparation: Keep Your System Updated
Before benchmarking, make sure your system is fully updated to minimize discrepancies:
sudo pacman -Syu
Also, install basic development tools if you haven’t already:
sudo pacman -S base-devel git
CPU Benchmarking
1. sysbench
sysbench
is a versatile, multi-threaded benchmarking tool useful for testing CPU, memory, and more.
Installation:
sudo pacman -S sysbench
Benchmarking CPU Performance:
sysbench cpu --threads=4 run
- You can increase
--threads
to match the number of CPU cores. - The output shows how many events per second your CPU can handle.
2. stress-ng
For stress testing under load:
sudo pacman -S stress-ng
Run a CPU stress test for 60 seconds:
stress-ng --cpu 4 --timeout 60s --metrics-brief
- Ideal for identifying thermal throttling and overall CPU resilience.
Memory Benchmarking
1. Using sysbench
for RAM:
sysbench memory run
This tests memory read/write performance. You can tweak parameters like block size and total size:
sysbench memory --memory-block-size=1M --memory-total-size=10G run
2. mbw
(Memory Bandwidth Benchmark)
mbw
tests memory copy performance across various methods.
Installation:
sudo pacman -S mbw
Usage:
mbw -n 10 100
- This will perform 10 iterations using 100MB of memory.
Disk I/O Benchmarking
Disk performance is critical for both desktops and servers. Let’s look at common tools.
1. fio
(Flexible I/O Tester)
fio
is an advanced tool for disk I/O benchmarking.
Installation:
sudo pacman -S fio
Random Read/Write Test:
fio --name=randrw --rw=randrw --size=1G --numjobs=4 --time_based --runtime=60s --group_reporting
- You can specify
--filename=/path/to/device
for targeting a specific disk.
2. dd
(Quick and Simple Test)
For a quick and dirty write speed test:
dd if=/dev/zero of=testfile bs=1G count=1 oflag=dsync
- This measures write throughput. Be careful not to run this on SSDs repeatedly as it can cause wear.
3. hdparm
for Read Speed
sudo hdparm -Tt /dev/sda
- Gives cached and buffered read speeds.
GPU Benchmarking
GPU benchmarks help assess graphics rendering, video encoding, and gaming performance.
1. glmark2
(OpenGL Performance Test)
Installation:
sudo pacman -S glmark2
Run the Benchmark:
glmark2
- It evaluates OpenGL performance across a series of scenes and effects.
2. vkmark
(Vulkan Benchmark)
If you want to benchmark Vulkan API performance:
yay -S vkmark
Run it with:
vkmark
- A useful tool if your system supports Vulkan, especially for modern gaming GPUs.
Full-System Benchmarking
1. phoronix-test-suite
Phoronix Test Suite is one of the most comprehensive benchmarking platforms available for Linux.
Installation:
sudo pacman -S phoronix-test-suite
Run and configure:
phoronix-test-suite
You can benchmark everything from CPU to power usage. Examples:
- Run a CPU test:
phoronix-test-suite benchmark compress-7zip
- Run a full suite:
phoronix-test-suite stress-run
You can also browse available tests:
phoronix-test-suite list-available-tests
And view results in a web-based viewer for easy comparison.
Gaming Benchmark: Steam and vulkaninfo
If you’re a gamer, benchmarking with real-world games can be insightful.
1. Steam Built-in Benchmarks
Many games have built-in benchmarking tools (e.g., Shadow of the Tomb Raider, Total War, Dota 2).
2. Vulkan System Info
vulkaninfo | less
This gives a low-level view of supported GPU features, ideal for developers or Vulkan-based applications.
Network Benchmarking
1. iperf3
A standard for measuring network throughput.
Installation:
sudo pacman -S iperf3
Usage:
- On server (machine A):
iperf3 -s
- On client (machine B):
iperf3 -c <server-ip>
This gives detailed TCP and UDP throughput, jitter, and loss stats.
Monitoring During Benchmarking
It’s important to monitor system metrics while running benchmarks.
Tools You Can Use
htop
: Real-time process viewer with CPU, memory, and load metrics.iotop
: Disk I/O activity per process.nvtop
: For NVIDIA GPU monitoring.radeontop
: For AMD GPUs.bpytop
: An aesthetic, Python-based system monitor.dstat
: Combines vmstat, iostat, netstat.
Install with:
sudo pacman -S htop iotop nvtop radeontop bpytop dstat
Saving and Comparing Results
If you plan to track performance over time:
- Use
tee
to save output:
sysbench cpu run | tee cpu_benchmark.txt
Or Phoronix Test Suite, which automatically saves results in a comparable format.
You can also visualize results using
gnuplot
,matplotlib
, orLibreOffice Calc
.
Tips for Reliable Benchmarking
- Close background processes to reduce noise.
- Run multiple iterations to average out fluctuations.
- Ensure consistent environmental conditions (e.g., temperature).
- Run benchmarks on battery and AC for laptops to compare performance scaling.
- Log kernel and system info for reproducibility:
uname -a
lscpu
lsmem
lsblk
Conclusion
Benchmarking on Arch Linux can be as minimal or as comprehensive as you need it to be. With a rich collection of up-to-date tools and full control over the environment, Arch users are in an excellent position to conduct meaningful performance analysis.
From quick CPU or disk checks using sysbench
and dd
, to full-system benchmarking with phoronix-test-suite
, there’s a tool for every aspect of your setup. Just remember to benchmark responsibly—frequent stress tests can wear out SSDs or heat up components unnecessarily.
Armed with these tools and techniques, you can confidently evaluate system performance, compare hardware, optimize workloads, and get the most out of your Arch Linux machine.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.