Sysbench 1.1 installation for AWS EC2 instance running Amazon Linux

Zen Liu
2 min readNov 7, 2019

--

Sysbench is a scriptable multi-threaded benchmark tool based on LuaJIT. It is most frequently used for database benchmarks, but can also be used to create arbitrarily complex workloads that do not involve a database server. It also comes with other bundled benchmarks like OLTP-like database benchmarks, filesystem-level benchmark, CPU benchmark etc.

https://github.com/akopytov/sysbench

In our case, we use it for filesystem-level benchmark. When we try to install on EC2 instance running Amazon Linux, we find that it is not as easy as just running the commands in README:

curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash
sudo yum -y install sysbench

You may get some errors like this:

Error: Package: sysbench-1.0.18–1.el6.x86_64 (akopytov_sysbench)
Requires: libmysqlclient_r.so.16()(64bit)
Error: Package: sysbench-1.0.18–1.el6.x86_64 (akopytov_sysbench)
Requires: libmysqlclient_r.so.16(libmysqlclient_16)(64bit)
You could try using — skip-broken to work around the problem
You could try running: rpm -Va — nofiles — nodigest

We google for a while and find an AWS article about the installation of Sysbench by building it from source code:
https://aws.amazon.com/blogs/database/running-sysbench-on-rds-mysql-rds-mariadb-and-amazon-aurora-mysql-via-ssl-tls/

Unfortunately, it does not work by following the steps in the article. We spent some efforts (trial and error LOL) to figure out the actual steps as the below:

  1. sudo yum -y install git gcc make automake libtool openssl-devel ncurses-compat-libs
  2. wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
    sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
    sudo yum -y update
  3. sudo yum -y install mysql-community-devel mysql-community-client mysql-community-common
  4. git clone https://github.com/akopytov/sysbench
  5. cd sysbench
    ./autogen.sh
    ./configure
    make
    sudo make install
  6. You can verify the installation by
    sysbench --version

Hope this article can save your time :)

--

--

Responses (4)