LKBEN11696: How to check CPU speed with sysbench on a linux system.


Symptom

You would like to know which system is faster.

Cause

-

Solution

A fast and easy cpu performance check between two systems can be done with sysbench.

A nice test for the cpu is to compare with the following command:

sysbench cpu --cpu-max-prime=20000 --threads=8 --time=0 --events=10000 run

Check the time the system needed to execute the command.

e.g. on an older SuperMicro Server this command took about 4,57 seconds. On an AMD 5600G the same command took only 0,8120 seconds.

Number of threads: 8
Initializing random number generator from current time


Prime numbers limit: 20000

Initializing worker threads...

Threads started!

CPU speed:
    events per second: 12309.00

General statistics:
    total time:                          0.8120s
    total number of events:              10000

Latency (ms):
         min:                                    0.50
         avg:                                    0.65
         max:                                    1.05
         95th percentile:                        0.92
         sum:                                 6491.76

Threads fairness:
    events (avg/stddev):           1250.0000/364.00
    execution time (avg/stddev):   0.8115/0.00

Have fun.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!

About the Author

Author: Wim Peeters - Keskon GmbH & Co. KG

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.

Latest update: 15/01/2024