Linux benchmark scripts and tools
This list of Linux benchmark scripts and tools should prove helpful for quick performance checks of CPU, storage, memory, and network on Linux servers and VPS. Check each script before running from the command line.
Most of these scripts will benchmark the CPU, memory, storage, and network. In most cases, the CPU Model, frequency, and number of cores will be displayed along with a basic CPU performance bench. Memory totals will be shown (see the other more extensive tools below for memory-specific benchmarks). System storage (SSD, NVMe, etc.) input/output speeds will be tested, and finally, the server’s internet connection will be tested by downloading files from common test locations around the world.
If your web host points to the cause of poor application performance as being solely related to WebDev, use these command-line scripts to help verify if hardware (for example, disk/storage bottleneck) or network may also be to blame.
Linux Benchmark Scripts
- Bench.sh – view system information and test the network, and disk of your Linux server.
- Nench – A script loosely based on the established freevps.us/bench.sh.
- VPSbench – A script to run simple and comprehensive benchmarks on CPU and IO performance.
- VPS Benchmark – Benchmark disk, CPU, and network.
- Linux Bench – STH Linux benchmarking script.
- Bench-sh-2 – System Info + Speedtest IPv4 + Drive Speed.
- unixbench.sh – Auto install unixbench and test script.
Other Linux Benchmark Tools
- byte-unixbench – UnixBench is the original BYTE UNIX benchmark suite, updated and revised by many people over the years.
- Fio – Flexible I/O Tester.
- Sysbench – Scriptable database and system performance benchmark.
- Bonnie – get/set ATA/SATA drive parameters under Linux.
- S – Small collection of programs to measure storage I/O performance.
- Phoronix Test Suite – The Phoronix Test Suite is open-source, cross-platform automated testing/benchmarking software.
- Geekbench – This tool allows you to use Geekbench 4 from a command prompt and automate it with shell scripts or batch files.
- vdbench – generate disk I/O workloads to be used for validating storage performance and storage data integrity.
- IOzone – a filesystem benchmark tool. The benchmark generates and measures a variety of file operations.
- Iometer – Iometer is an I/O subsystem measurement and characterization tool for single and clustered systems.
- Interbench – Linux Interactivity Benchmark
- HDparm – get/set ATA/SATA drive parameters under Linux
- dd – Benchmark Your VPS with dd, a how-to guide.
Use at your own risk. Always verify before running. If you find any broken scripts or issues, please notify me.
Originally published: December 6, 2017 | Last updated: February 23, 2023
Can I ask for some scripts and examples of commands to test NVME disk in real-life-scenarios?
Hi Adrian, welcome to the community! In addition to the benchmark scripts that are listed at the top of the linked page above; you can use
ddfor R/W tests. The list of commands to use is on this page.
(I used the ‘fdatasync’ flag with dd as it’s likely the closest behavior to the real-world tasks, for dd).
You can also use hdparm. Something like
sudo hdparm -tT /dev/nvme0n1:
fdisk -lfor a list of your disks and partitions
dd requires mounted partitions for the test, while hdparm does not.
For a closer real-world performance of your NVMe, use bonnie++ or similar tools.