Install Sysbench on Raspberry Pi

Install Sysbench on Raspberry Pi

Sysbench is an open-source command line tool that enables to benchmark system by running various tests for CPU, RAM, disk I/O and database (e.g. MySQL).

This tutorial demonstrates how to install Sysbench on Raspberry Pi.

Install Sysbench

Connect to Raspberry Pi via SSH and update the package lists using the following command:

sudo apt update

Install Sysbench:

sudo apt install -y sysbench

Once installation is finished, we can check Sysbench version:

sysbench --version

Testing Sysbench

Run the following command to evaluate the CPU performance:

sysbench cpu run

You will get performance results in the following format:

CPU speed:
    events per second:   118.71

General statistics:
    total time:                          10.0010s
    total number of events:              1188

Latency (ms):
         min:                                    8.33
         avg:                                    8.42
         max:                                   25.61
         95th percentile:                        8.43
         sum:                                 9997.54

Threads fairness:
    events (avg/stddev):           1188.0000/0.00
    execution time (avg/stddev):   9.9975/0.00

RAM performance testing can be performed as well:

sysbench memory run

We can test various storage I/O operations. For example, sequential write (seqwr) performance can be tested by using this command:

sysbench fileio --file-test-mode=seqwr run

Uninstall Sysbench

If you want to completely remove Sysbench and related dependencies, use the following command:

sudo apt purge --autoremove -y sysbench

Leave a Comment

Cancel reply

Your email address will not be published.