Project

Profile

Help

Sysbench

Manual

Syntax and command line options can be found here: http://imysql.com/wp-content/uploads/2014/10/sysbench-manual.pdf

Installation

To install sysbench v0.5 you should acquire username, ip, and keyfile form mdbci generated machine. And then run in mdbci directory

./scripts/install_sysbench.sh $USER $IP $KEYFILE

P.S. installation require machine with mariadb installed - otherwise there will be error

How to run benchmark

Prepare database

  • create database 'sbtest'
    mysql -uroot -e "create database 'sbtest'" 
    
  • prepare database with 1,000,000 rows of data
    sysbench --test='oltp.lua' --oltp-table-size=1000000 --mysql-db=sbtest --mysql-user=root --mysql-password='' prepare
    

Example of test sessions

  • This script will run 6 tests. It will run 1 through 64 threaded tests, which seem to be the most common tests to run. This test does selects, updates, and various other things and is considered to be a "read / write".
    for each in 1 4 8 16 32 64; do sysbench --test='oltp.lua' --oltp-table-size=1000000 --mysql-db=sbtest --mysql-user=root --mysql-password='' --max-time=240 --max-requests=0 --num-threads=$each run; done
    
  • This script will run 6 tests. It will run 1 through 64 threaded tests, which seem to be the most common tests to run. This runs selects only, and is considered to be "read only".
    for each in 1 4 8 16 32 64; do sysbench --test='oltp.lua' --oltp-table-size=1000000 --mysql-db=sbtest --mysql-user=root --mysql-password='' --oltp-read-only=on  --max-time=240 --max-requests=0 --num-threads=$each run; done
    

Output description

This section lists and describes the output from the sysbench benchmark runs. The key performance
metrics are:
  • Transactions per second
  • Read/write requests per second
OLTP test statistics:
    queries performed:
        read:                            479542
        write:                           0
        other:                           68506
        total:                           548048
    transactions:                        34253  (570.83 per sec.)
    read/write requests:                 479542 (7991.68 per sec.)
    other operations:                    68506  (1141.67 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          60.0052s
    total number of events:              34253
    total time taken by event execution: 479.9865s
    response time:
         min:                                  6.06ms
         avg:                                 14.01ms
         max:                               3442.76ms
         approx.  95 percentile:              15.63ms

Threads fairness:
    events (avg/stddev):           4281.6250/5.96
    execution time (avg/stddev):   59.9983/0.00

Cleanup

Cleanup (database removing)

sysbench --test='oltp.lua' --mysql-db=sbtest --mysql-user=root --mysql-password='' cleanup

Usefull links