UnixBench Score: An Introduction

By Chao Qian (Xixie)

UnixBench is a benchmark suite that provides a basic indicators of the performance of a Unix-like system. It runs multiple tests on a system and compares the scores from a baseline system to produce an index value, which is combined to make an overall index for the system.

This article introduces UnixBench, focusing on how it calculates scores.

Running Parameters

Many customers directly run UnixBench after installation and use the last score for comparison.

The following is the sample result of a 4 core 8 GB CPU:

Many people use 3357 for comparison and pay little attention to the single-process score 1362.9, which is also significant. The multi-process result is based on the number of CPU cores, while the single-process result is based on only one process. Both results show the system performance.

Then, what has been executed with . /Run? By default, the Index module is executed, which contains the following applets:

They correspond to the above results.

The source code indicates that the following parameters are executed: /Run Module -i Number of iterations -c Number of concurrent processes -q/-v (output mode)

  • Module: If you want only the test result of an applet, you can specify the module and modify the test content, which is convenient for debugging. You can also specify the execution program.
  • Number of iterations: By default, the framework supports two iteration modes, namely short iterations (3 iterations by default) and long iterations (10 iterations by default). The input number of iterations indicates the number of iterations by default in long iterations. In short iterations, the number of iterations is (Input number of iterations + 1)/3. If the result is less than 1, 1 is used. After the applet is configured, select the number of iterations.
  • Number of concurrent processes: If you want the number of concurrent processes to be different from the number of system CPUs, set this parameter.
  • Output mode: Select the Silent or Details output mode.

Score Calculation

When running each applet, you need to specify the iteration mode, execution time, and concurrency. The same mode is applied to all the processes each time.

Score Calculation with a Single Process

The following is an example of score calculation with a single process:

The following shows the method to obtain results of COUNT0, COUNT1, and COUNT2.

After parsing, it is converted as shown in the following figure.

The score calculation process is as follows:

1. The results are sorted in ascending order from COUNT0 and the last 1/3 of the results are removed.
2. If timebase is used, the time elapsed is always greater than 0, and $product += log($COUNT0) - log(Time elapsed/ $timebase). Otherwise, the time elapsed can be ignored and $product += log($COUNT0).
3. Single performance score: $score = exp($product/2), where 2 indicates the number of iterations. The calculated score is the same as the system-generated score.

The general calculation method is to first use the log to implement dimensionality reduction to narrow the gap between the results obtained through different numbers of iterations as much as possible. Then the factorial operation is applied to the average. This method also applies to multiple performance scores.

Multi-Process Score Calculation

If multiple concurrent processes are used for score calculation, see the following example:

The score calculation process is as follows:

  1. Score: For example, the score 18545 is the sum of the scores (4631 + 4632 + 4637 + 4645) of Pass1, Pass2, and Pass3.
  2. Time elapsed: This is an average, that is, (60.013816+60.012614+60.005633+60.006082)/4=60.00953625.
  3. timebase: COUNT1.

The preceding three steps combine concurrent calculation results into one single result. The subsequent calculation is the same as that for score calculation with a single process.

Total Score

Take the score calculation with multiple processes illustrated at the beginning of this article as an example.

  1. Each calculated score is a weighted score and must be divided by 10. (For single item competition, it doesn’t matter if the scores are divided by 10. This may aim to make the scores closer to the total score.)
  2. Calculation of the total score: =exp(average(Each score*10)). The expected result is obtained.


This is the end of the description of score calculation with UnixBench. The tables below illustrate the calculation process of the scores.

Single Process Score

Multi Process Score

Total Score


Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store