How To Install sysbench on CentOS 8

sysbench is System performance benchmark

Introduction

In this tutorial we learn how to install sysbench on CentOS 8.

What is sysbench

SysBench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database under intensive load. The idea of this benchmark suite is to quickly get an impression about system performance without setting up complex database benchmarks or even without installing a database at all. Current features allow to test the following system parameters - file I/O performance - scheduler performance - memory allocation and transfer speed - POSIX threads implementation performance - database server performance (OLTP benchmark) Primarily written for MySQL server benchmarking, SysBench will be further extended to support multiple database backends, distributed benchmarks and third-party plug-in modules.

We can use yum or dnf to install sysbench on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install sysbench.

Install sysbench on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install sysbench using dnf by running the following command:

sudo dnf -y install sysbench

Install sysbench on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install sysbench using yum by running the following command:

sudo yum -y install sysbench

How To Uninstall sysbench on CentOS 8

To uninstall only the sysbench package we can use the following command:

sudo dnf remove sysbench

sysbench Package Contents on CentOS 8

/usr/bin/sysbench
/usr/lib/.build-id
/usr/lib/.build-id/32
/usr/lib/.build-id/32/4d96c15e4392dfa5ae2b434139f541a12a88d6
/usr/share/doc/sysbench
/usr/share/doc/sysbench/ChangeLog
/usr/share/doc/sysbench/README.md
/usr/share/doc/sysbench/manual.html
/usr/share/licenses/sysbench
/usr/share/licenses/sysbench/COPYING
/usr/share/sysbench
/usr/share/sysbench/bulk_insert.lua
/usr/share/sysbench/oltp_common.lua
/usr/share/sysbench/oltp_delete.lua
/usr/share/sysbench/oltp_insert.lua
/usr/share/sysbench/oltp_point_select.lua
/usr/share/sysbench/oltp_read_only.lua
/usr/share/sysbench/oltp_read_write.lua
/usr/share/sysbench/oltp_update_index.lua
/usr/share/sysbench/oltp_update_non_index.lua
/usr/share/sysbench/oltp_write_only.lua
/usr/share/sysbench/select_random_points.lua
/usr/share/sysbench/select_random_ranges.lua
/usr/share/sysbench/tests
/usr/share/sysbench/tests/include
/usr/share/sysbench/tests/include/api_sql_common.sh
/usr/share/sysbench/tests/include/config.sh
/usr/share/sysbench/tests/include/drv_common.sh
/usr/share/sysbench/tests/include/inspect.lua
/usr/share/sysbench/tests/include/mysql_common.sh
/usr/share/sysbench/tests/include/oltp_legacy
/usr/share/sysbench/tests/include/oltp_legacy/bulk_insert.lua
/usr/share/sysbench/tests/include/oltp_legacy/common.lua
/usr/share/sysbench/tests/include/oltp_legacy/delete.lua
/usr/share/sysbench/tests/include/oltp_legacy/insert.lua
/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua
/usr/share/sysbench/tests/include/oltp_legacy/oltp_simple.lua
/usr/share/sysbench/tests/include/oltp_legacy/parallel_prepare.lua
/usr/share/sysbench/tests/include/oltp_legacy/select.lua
/usr/share/sysbench/tests/include/oltp_legacy/select_random_points.lua
/usr/share/sysbench/tests/include/oltp_legacy/select_random_ranges.lua
/usr/share/sysbench/tests/include/oltp_legacy/update_index.lua
/usr/share/sysbench/tests/include/oltp_legacy/update_non_index.lua
/usr/share/sysbench/tests/include/pgsql_common.sh
/usr/share/sysbench/tests/include/script_bulk_insert_common.sh
/usr/share/sysbench/tests/include/script_oltp_common.sh
/usr/share/sysbench/tests/include/script_oltp_legacy_common.sh
/usr/share/sysbench/tests/include/script_select_random_common.sh
/usr/share/sysbench/tests/include/script_select_random_legacy_common.sh
/usr/share/sysbench/tests/t
/usr/share/sysbench/tests/t/1st.t
/usr/share/sysbench/tests/t/api_basic.t
/usr/share/sysbench/tests/t/api_histogram.t
/usr/share/sysbench/tests/t/api_legacy_basic.t
/usr/share/sysbench/tests/t/api_legacy_rand.t
/usr/share/sysbench/tests/t/api_legacy_sql.t
/usr/share/sysbench/tests/t/api_rand.t
/usr/share/sysbench/tests/t/api_reports.t
/usr/share/sysbench/tests/t/api_sql_mysql.t
/usr/share/sysbench/tests/t/api_sql_pgsql.t
/usr/share/sysbench/tests/t/cmd_cleanup.t
/usr/share/sysbench/tests/t/cmd_help.t
/usr/share/sysbench/tests/t/cmd_prepare.t
/usr/share/sysbench/tests/t/cmd_run.t
/usr/share/sysbench/tests/t/cmdline.t
/usr/share/sysbench/tests/t/commands.t
/usr/share/sysbench/tests/t/drivers.t
/usr/share/sysbench/tests/t/drv_mysql.t
/usr/share/sysbench/tests/t/drv_pgsql.t
/usr/share/sysbench/tests/t/help_drv_mysql.t
/usr/share/sysbench/tests/t/help_drv_pgsql.t
/usr/share/sysbench/tests/t/opt_help.t
/usr/share/sysbench/tests/t/opt_histogram.t
/usr/share/sysbench/tests/t/opt_rate.t
/usr/share/sysbench/tests/t/opt_report_checkpoints.t
/usr/share/sysbench/tests/t/opt_report_interval.t
/usr/share/sysbench/tests/t/opt_version.t
/usr/share/sysbench/tests/t/script_bulk_insert_mysql.t
/usr/share/sysbench/tests/t/script_bulk_insert_pgsql.t
/usr/share/sysbench/tests/t/script_oltp_delete_mysql.t
/usr/share/sysbench/tests/t/script_oltp_delete_pgsql.t
/usr/share/sysbench/tests/t/script_oltp_help.t
/usr/share/sysbench/tests/t/script_oltp_insert_mysql.t
/usr/share/sysbench/tests/t/script_oltp_insert_pgsql.t
/usr/share/sysbench/tests/t/script_oltp_point_select_mysql.t
/usr/share/sysbench/tests/t/script_oltp_point_select_pgsql.t
/usr/share/sysbench/tests/t/script_oltp_read_write_mysql.t
/usr/share/sysbench/tests/t/script_oltp_read_write_pgsql.t
/usr/share/sysbench/tests/t/script_select_random_mysql.t
/usr/share/sysbench/tests/t/script_select_random_pgsql.t
/usr/share/sysbench/tests/t/test_cpu.t
/usr/share/sysbench/tests/t/test_fileio.t
/usr/share/sysbench/tests/t/test_memory.t
/usr/share/sysbench/tests/t/test_mutex.t
/usr/share/sysbench/tests/t/test_threads.t
/usr/share/sysbench/tests/t/tests.t
/usr/share/sysbench/tests/test_run.sh

References

Summary

In this tutorial we learn how to install sysbench on CentOS 8 using yum and dnf.