Is there a benchmark tool to measure computer performance for Ubuntu like SuperPI, 3DMark, or PCMark?
The most complete benchmarking software is probably Phoronix test suite, which is available in the repositories and can be installed with:
sudo apt-get install phoronix-test-suite
phoronix-test-suite for the first time in terminal, you can either answer yes or no to the questions regarding anonymous statistical reporting. If you answer yes, it says that
This information is pooled along with the submissions from all other users to show general trends and other details on OpenBenchmarking.org.
It is up to you whether you choose yes or no, but there is nothing to be concerned with. You can still later upload results manually to openbenchmarking if you wish with the options in the program:
phoronix-test-suite upload-result <your test-result>
To list all the tests available (but not necessarily downloaded), run:
which gives tests such as these and many others:
pts/aio-stress - AIO-Stress Disk pts/apache - Apache Benchmark System pts/apitrace - APITrace Graphics pts/battery-power-usage - Battery Power Usage System pts/blogbench - BlogBench Disk
To find information on any particular test, you can use:
phoronix-test-suite info povray
Many of the tests are not installed by default and you can either download an individual test and run it with, for example:
phoronix-test-suite install povray phoronix-test-suite run povray
To find the lists of thematic test suites, run
which returns such things as
pts/audio-encoding - Audio Encoding System pts/chess - Chess Test Suite Processor pts/compilation - Timed Code Compilation Processor pts/compiler - Compiler Processor pts/compression - Timed File Compression Processor
As an example, you might want to run the entire suite of audio tests (instead of just one from those listed with the
list-tests command), so, in this circumstance, enter
phoronix-test-suite run audio-encoding
For this test, some more of the related audio tests are downloaded and installed by the program and then the test is run.
There are a huge amount of tests to install and options to experiment with, but this test suite is definitely the one to use if you want to get some genuine benchmarks from your Ubuntu system that you can compare online at openbenchmarking and Phoronix.com.
It is not a quick, simple benchmarking application, but one that, with its multiple tests, will satisfy most areas of interest in regard to how things perform on Ubuntu.
However, benchmarking is a topic much debated and the forums are best suited for analysing which tests give the most useful results and how the tests should be setup; the one mentioned above,
povray, is quite well known and regarded for benchmarking the abilities of a CPU.
I eventually got around to writing a stress test and benchmarking tool for UNIX like systems, namely stress-ng. It contains over 180 stress tests that allow one to measure throughput on various system components, from memory, cache, CPU, system calls, network, etc. Install with:
sudo apt-get install stress-ng
There is a --metrics-brief option that reports the throughput in terms of bogo ops per second. One can get a full set of deep CPU and system metrics using the --perf option. There are many types of stressors that can be run sequentially or in parallel on 1 or more CPUs, for example:
stress-ng --metrics-brief --cpu 2 -t 1m
this will exercise the CPU for 1 minute with 2 CPU stressor instances running in parallel.
Another option is sysbench. It is a command line tool with built in tests for CPU, memory, file, threading and database. There is an article about it here. Install is a single package, and running tests is quick.
Likely the quality of results is lower than more sophisticated tests, but I found it useful for a quick sanity check when evaluating potential VPS hosting.
Based on the popular answer by user76204, I did try Phoronix test suite. As the author says, it is not quick or simple. There are 100s of tests available and it's not obvious which to use. Some require 100s of MB of downloads, some take an hour or more to run, some may not run on your server. On Ubuntu, I hit a bug described here.