MySQL Benchmark

# install
yum install -y sysbench

mysql -uroot -p
> create database dbtest; exit;

# prepare
sysbench --test=oltp --oltp-table-size=10000000 \
--db-driver=mysql --mysql-db=dbtest --mysql-user=root \
[email protected] --mysql-host=127.0.0.1 prepare

# run test
sysbench \
    --test=oltp \
    --oltp-read-only=off \
    --oltp-table-size=10000000 \
    --oltp-test-mode=complex \
    --num-threads=40 \
    --max-requests=0 \
    --max-time=600 \
    --db-driver=mysql \
    --mysql-db=dbtest \
    --mysql-user=root \
    [email protected] \
    --mysql-host=127.0.0.1 \
    run