ObjectiveUse GeekBench, Sysbench, Hardinfo, and Phoronix Test Suite to benchmark your Linux system.
DistributionsThis will work on most modern distributions.
RequirementsA working Linux install with root privileges.
- # - requires given linux command to be executed with root privileges either directly as a root user or by use of
- $ - given linux command to be executed as a regular non-privileged user
IntroductionThere are a bunch of reasons that you'd want to benchmark your Linux system. Most people benchmark out of pure curiosity or to measure the system's performance for games. Benchmarking can also help you identify problems with your system, though, and improve weak points for a smoother and more efficient experience. Benchmarking also helps you identify possible software issues and problematic upgrades with regressions.
There are a number of great ways to benchmark your Linux system. This guide will cover a few of the most common ones. Using any number of these will give you a good perspective of what your system can do, and where its possible weak points are.
SysbenchSysbench is a mutli-purpose benchmark that features tests for CPU, memory, I/O, and even database performance testing. It's a basic command line utility that offers a direct and uncomplicated way to test your system.
Install SysbenchStart by installing Sysbench on your system. It's available from most distribution repositories.
$ sudo apt install sysbenchFedora
# dnf install sysbenchOpenSUSE
# zypper in sysbenchArch Linux
Sysbench is available from the AUR. Go to its page, and follow your preferred procedure to install it.
--test=X run. Change the
helpto get the options specific to that test. Why not start out by running the CPU test. It's probably the most common one that you'll want to check, especially if you're an overclocker.
$ sysbench --test=cpu runThe test will take a bit of time to run, and afterward, you'll see your results printed out in the terminal.
$ sysbench --test=memory runOnce again, you'll see your results in the terminal.
helpcommand for the test. A basic sequential write looks like this:
$ sysbench --test=fileio --file-test-mode=seqwr runJust like the others, you'll see a report when it's done.
GeekBenchGeekBench is another complete test suite that's available for Linux. GeekBench automatically puts your system through a battery of tests and produces a complete set of results as well as an overall score.
You can head over to the GeekBench website, and download the latest release for Linux. GeekBench is proprietary software and comes as a set of binaries in a tarball. When it's finished downloading, unpack the tarball wherever is convenient.
HardinfoHardinfo is a great utility that provides both detailed system information and a series of basic benchmarks. It's open source, and it's available in most distribution's repositories.
$ sudo apt install hardinfoFedora
For some reason, the Fedora developers decided to stop packaging Hardinfo, so you'll need to build it yourself.
# dnf install glib-devel gtk+-devel zlib-devel libsoup-devel $ cd Downloads $ git clone https://github.com/lpereira/hardinfo.git $ cd hardinfo $ mkdir build $ cd build $ cmake .. $ make # make install
# zypper in hardinfoArch Linux
# pacman -S hardinfo
Using HardinfoOpen up Hardinfo on your computer. It's a graphical utility, and it should be categorized under System by your distribution's launcher.
The final category at the bottom of the list is "Benchmarks." There are only a handful there, but they all can be pretty useful. Click on the tab you want, and Hardinfo will run the benchmark. When it's finished, it'll display your results in the right pane.
Phoronix Test SuitePhoronix Test Suite is a complete benchmark suite that curates loads of Linux benchmark tools under one umbrella with PHP scripts.
Installation and Graphics TestsFor information on how to install Phoronix Test Suite on your distribution and run graphics tests, check out our guide on graphics benchmarking with PTS. When you have the suite installed and working, you can move on to the rest of the tests here. The rest of these tests are just a sampling of what Phoronix Test Suite has. They're more general purpose and practical tests.
John The Ripper
$ phoronix-test-suite install john-the-ripperWhen that finishes, run the test.
$ phoronix-test-suite run john-the-ripperThe test will run three times, and you'll see your results displayed in the terminal.
LuxMarkLuxMark is another performance test that measures both OpenCL performance of both the CPU and GPU. They're both obviously important parts of your computer as a whole, and this test is also great if you plan on using your computer for any compute tasks.
$ phoronx-test-suite install luxmarkThen run it.
$ phoronix-test-suite run luxmark
Compile FirefoxFirefox is a beast of a program. It's absolutely massive, and it takes a lot of time and system resources to compile. If you really want to test your system, especially your CPU to the max, try compiling Firefox.
$ phoronix-test-suite install compile-firefox $ phoronix-test-suite run compile-firefox
Compress GzipGzip compression is another great example of a practical test that you can conduct on your Linux system. Chances are, you use gzip on a regular basis, so measuring its performance gives you a real world way to see how your system stacks up.
$ phoronix-test-suite install compress-gzip $ phoronix-test-suite run compress-gzip