Don’t Just Benchmark Phones! A Comprehensive Guide to Linux Performance Testing

Don’t Just Benchmark Phones! A Comprehensive Guide to Linux Performance Testing

When people mention “benchmarking”, the first thing that comes to mind is usually mobile phone tests like AnTuTu or computer tests like 3DMark—either on Windows or Android. But did you know that you can also benchmark on Linux? It’s not just about getting a “score”; it can help you understand how powerful your server’s CPU, memory, disk, and network are, and even accurately pinpoint performance bottlenecks. In this article, we will introduce you to several commonly used Linux benchmarking tools in the most straightforward way, so you can go beyond just checking phone scores and master server performance testing.

Don't Just Benchmark Phones! A Comprehensive Guide to Linux Performance Testing
img

1. Using nench

nench will automatically test:

CPU performance, disk I/O read/write speed, network download speed (testing multiple regions)

curl -sL wget.racing/nench.sh | bash
或者

curl -sL https://gitee.com/funet8/Rocky-Linux-Shell/raw/main/monitor/nench.sh | bash

nench Results

[root@node3 ~]# curl -sL wget.racing/nench.sh | bash
-------------------------------------------------
 nench.sh v2019.07.20 -- https://git.io/nench.sh
 benchmark timestamp:    2025-09-18 06:20:18 UTC
-------------------------------------------------

Processor:    11th Gen Intel(R) Core(TM) i7-11390H @ 3.40GHz
CPU cores:    2
Frequency:    3417.606 MHz
RAM:          3.5Gi
Swap:         2.0Gi
Kernel:       Linux 5.14.0-570.22.1.el9_6.x86_64 x86_64

Disks:
nvme0n1    100G  SSD
nvme0n2    100G  SSD

CPU: SHA256-hashing 500 MB
    0.471 seconds
CPU: bzip2-compressing 500 MB
    CPU: AES-encrypting 500 MB
    0.582 seconds

ioping: seek rate
    ioping: sequential read speed
    
dd: sequential write speed
    1st run:    613.21 MiB/s
    2nd run:    2193.45 MiB/s
    3rd run:    2193.45 MiB/s
    average:    1666.70 MiB/s

IPv4 speedtests
    your IPv4:    14.155.113.xxxx

    Cachefly CDN:         0.00 MiB/s
    Leaseweb (NL):        0.02 MiB/s
    Softlayer DAL (US):   0.00 MiB/s
    Online.net (FR):      6.91 MiB/s
    OVH BHS (CA):         0.21 MiB/s

No IPv6 connectivity detected
-------------------------------------------------

2. Using bench.sh

Server hardware + network speed + disk

curl -sL https://gitee.com/funet8/Rocky-Linux-Shell/raw/main/monitor/bench.sh| bash

Source file: https://raw.githubusercontent.com/teddysun/across/refs/heads/master/bench.sh

bench Results

curl -sL https://raw.githubusercontent.com/teddysun/across/refs/heads/master/bench.sh | bash
-------------------- A Bench.sh Script By Teddysun -------------------
 Version            : v2025-05-08
 Usage              : wget -qO- bench.sh | bash
----------------------------------------------------------------------
 CPU Model          : 11th Gen Intel(R) Core(TM) i7-11390H @ 3.40GHz
 CPU Cores          : 2 @ 3417.606 MHz
 CPU Cache          : 12288 KB
 AES-NI             : ✓ Enabled
 VM-x/AMD-V         : ✗ Disabled
 Total Disk         : 197.7 GB (5.7 GB Used)
 Total Mem          : 3.5 GB (606.1 MB Used)
 Total Swap         : 2.0 GB (0 Used)
 System uptime      : 1 days, 7 hour 8 min
 Load average       : 0.00, 0.03, 0.08
 OS                 : Rocky Linux release 9.6 (Blue Onyx)
 Arch               : x86_64 (64 Bit)
 Kernel             : 5.14.0-570.22.1.el9_6.x86_64
 TCP CC             : cubic
 Virtualization     : VMware
 IPv4/IPv6          : ✓ Online / ✗ Offline
 Organization       : AS4134 CHINANET-BACKBONE
 Location           : Shenzhen / CN
 Region             : Guangdong
----------------------------------------------------------------------
 I/O Speed(1st run) : 1.0 GB/s
 I/O Speed(2nd run) : 1.6 GB/s
 I/O Speed(3rd run) : 1.6 GB/s
 I/O Speed(average) : 1433.6 MB/s
----------------------------------------------------------------------
 Node Name        Upload Speed      Download Speed      Latency     
 Paris, FR        105.06 Mbps       577.33 Mbps         223.35 ms   
 Amsterdam, NL    65.13 Mbps        6.85 Mbps           256.49 ms   
 Shanghai, CN     97.54 Mbps        482.40 Mbps         32.10 ms    
 Hong Kong, CN    4.50 Mbps         5.25 Mbps           11.61 ms    
 Tokyo, JP        79.18 Mbps        689.46 Mbps         115.56 ms   
----------------------------------------------------------------------
 Finished in        : 4 min 30 sec
 Timestamp          : 2025-09-18 16:22:21 CST
----------------------------------------------------------------------

3. Using superspeed (error reported)

Open source address: https://github.com/i-abc/Speedtest

Speed from major domestic operators (Telecom/Unicom/China Mobile)

Ping values from multiple regions

This file is no longer available: curl -fsSL https://bench.im/speedtest.sh | bash  

curl -sL https://gitee.com/funet8/Rocky-Linux-Shell/raw/main/monitor/speedtest.sh| bash

Source file:
bash <(curl -sL https://raw.githubusercontent.com/i-abc/Speedtest/main/speedtest.sh)

Test Results

sha256sum: ./sp-github-i-abc/speedtest-cli.tgz: No such file or directory
sha256sum: ./sp-github-i-abc/bim-core: No such file or directory
sha256sum: ./sp-github-i-abc/speedtest-go.tar.gz: No such file or directory
sha256sum: ./sp-github-i-abc/librespeed-cli.tar.gz: No such file or directory
The SHA-256 of speedtest-cli does not match the official version. If convenient, please provide feedback on GitHub

Error reason: https://github.com/i-abc/Speedtest/issues/19

4. Network Quality Testing with Speedtest

# Install speedtest-cli (Ubuntu/Debian)
sudo apt install -y speedtest-cli

# Install speedtest-cli (CentOS/RHEL)
sudo yum install -y speedtest-cli

# Run the test
speedtest-cli

Test Results

speedtest-cli
Retrieving speedtest.net configuration...
Testing from China Telecom (X.X.X.X)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Chunghwa Mobile (Changhua) [679.03 km]: 176.978 ms
Testing download speed................................................................................
Download: 0.07 Mbit/s
Testing upload speed......................................................................................................
Upload: 0.41 Mbit/s

5. Using Geekbench

Professional CPU benchmarking with a single command

wget -qO- http://cdn.geekbench.com/Geekbench-6.2.2-Linux.tar.gz | tar xz --strip-components=1 && ./geekbench6

Test Results

wget -qO- http://cdn.geekbench.com/Geekbench-6.2.2-Linux.tar.gz | tar xz --strip-components=1 && ./geekbench6

Geekbench 6.2.2 : https://www.geekbench.com/

Geekbench 6 requires an active internet connection and automatically uploads 
benchmark results to the Geekbench Browser.

Upgrade to Geekbench 6 Pro to enable offline use and unlock other features:

  https://store.primatelabs.com/v6

Enter your Geekbench 6 Pro license using the following command line:

  ./geekbench6 --unlock <email> <key>

System Information
  Operating System              Rocky Linux 9.6 (Blue Onyx)
  Kernel                        Linux 5.14.0-570.22.1.el9_6.x86_64 x86_64
  Model                         VMware, Inc. VMware Virtual Platform
  Motherboard                   Intel Corporation 440BX Desktop Reference Platform
  BIOS                          Phoenix Technologies LTD 6.00

CPU Information
  Name                          Intel Core i7-11390H
  Topology                      2 Processors, 2 Cores
  Identifier                    GenuineIntel Family 6 Model 140 Stepping 2
  Base Frequency                3.42 GHz
  L1 Instruction Cache          32.0 KB
  L1 Data Cache                 48.0 KB
  L2 Cache                      1.25 MB
  L3 Cache                      12.0 MB

Memory Information
  Size                          3.54 GB

Single-Core
  Running File Compression
  Running Navigation
  Running HTML5 Browser
  Running PDF Renderer
  Running Photo Library
  Running Clang
  Running Text Processing
  Running Asset Compression
  Running Object Detection
  Running Background Blur
  Running Horizon Detection
  Running Object Remover
  Running HDR
  Running Photo Filter
  Running Ray Tracer
  Running Structure from Motion

Multi-Core
  Running File Compression
  Running Navigation
  Running HTML5 Browser
  Running PDF Renderer
  Running Photo Library
  Running Clang
  Running Text Processing
  Running Asset Compression
  Running Object Detection
  Running Background Blur
  Running Horizon Detection
  Running Object Remover
  Running HDR
  Running Photo Filter
  Running Ray Tracer
  Running Structure from Motion

Uploading results to the Geekbench Browser. This could take a minute or two 
depending on the speed of your internet connection.

Upload succeeded. Visit the following link and view your results online:

  https://browser.geekbench.com/v6/cpu/13890045

Visit the following link and add this result to your profile:
View Results
  https://browser.geekbench.com/v6/cpu/13890045/claim?key=354758
  

6. Viewing Memory Usage with ps_mem

https://github.com/pixelb/ps_mem

Usage

wget https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py
python ps_mem.py

或者

wget -qO- https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py | python3

Effect

root@developer:~# wget -qO- https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py | python3
 Private  +   Shared  =  RAM used       Program

128.0 KiB +  15.5 KiB = 143.5 KiB       fusermount3
 96.0 KiB +  72.5 KiB = 168.5 KiB       lightdm-greeter
100.0 KiB +  72.5 KiB = 172.5 KiB       Xtigervnc-sessi
... (omitted)
 27.7 MiB +   5.8 MiB =  33.5 MiB       Xorg
 35.9 MiB +   0.5 KiB =  35.9 MiB       snapd
 13.6 MiB +  23.7 MiB =  37.2 MiB       systemd-journald
 28.3 MiB +   9.3 MiB =  37.6 MiB       xfwm4
 46.9 MiB +   8.0 MiB =  54.9 MiB       xfdesktop
 82.8 MiB +   9.6 MiB =  92.3 MiB       Xtigervnc
---------------------------------
                        849.4 MiB
=================================

7. Comprehensive Benchmarking with UnixBench

The output includes multiple sub-tests and a comprehensive score; the higher the value, the better the performance.

# Install dependencies
sudo apt install -y build-essential perl
# Get the source code
git clone https://github.com/kdlucas/byte-unixbench.git
cd byte-unixbench/UnixBench
# Compile and run
make
./Run

8. CPU Benchmarking: sysbench

Focus on events per second (the higher, the better) and total time (the shorter, the better).

# Install
sudo apt install -y sysbench
# Test CPU (calculate prime numbers up to 20000)
sysbench cpu --cpu-max-prime=20000 run

9. Disk I/O: fio

Focus on IOPS (input/output operations per second) and BW (bandwidth).

# Install
sudo apt install -y fio
# Random write test
fio --name=randwrite --ioengine=libaio --rw=randwrite \
    --bs=4k --size=1G --numjobs=4 --runtime=60 --group_reporting

10. Network Bandwidth: iperf3

The results show actual bandwidth (Mbps/Gbps).

# Install
sudo apt install -y iperf3
# Server side
iperf3 -s
# Client side (replace <server_ip>)
iperf3 -c <server_ip>

Common Benchmarking Tools Classification

Tool/Script Test Scope Features Applicable Scenarios
UnixBench CPU, memory, I/O, process management Classic comprehensive benchmark, results can be compared horizontally Comprehensive evaluation of overall server performance
Geekbench CPU (single-core/multi-core), memory Cross-platform, results can be uploaded for comparison CPU performance comparison, hardware evaluation
sysbench CPU, memory, disk I/O Customizable parameters, suitable for stress testing Targeted testing of single hardware performance
fio Disk I/O Supports various I/O modes, detailed results Storage performance evaluation, database tuning
iperf3 Network bandwidth TCP/UDP testing, supports bidirectional Internal/external network bandwidth testing
nench / bench.sh CPU, disk, network One-click script, quick results Quick assessment of VPS/cloud host
glmark2 GPU Graphics performance testing GPU server evaluation

Reference website: https://blog.csdn.net/AlegFox/article/details/146125974 Some addresses in the reference website are invalid; I have downloaded them to the repository for backup.

Linux benchmarking tools are diverse, ranging from one-click scripts to professional benchmark suites. It is recommended to first use bench.sh / nench for a quick assessment, then use UnixBench / sysbench / fio / iperf3 for targeted deep testing, and finally optimize based on business load.

Leave a Comment