Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 861 Bytes

Sysbench.md

File metadata and controls

26 lines (20 loc) · 861 Bytes

Install sysbench

yum localinstall http://repo.percona.com/release/7/RPMS/x86_64/sysbench-1.0.8-1.el7.x86_64.rpm   

##create

create database demo;

create tables and load data

sysbench --db-driver=mysql --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp-table-size=1000000 --mysql-db=demo --mysql-user=root --mysql-password=oracle --mysql-port=3306 --mysql-host=mysqlserver01 prepare

##run

sysbench --db-driver=mysql --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp-table-size=1000000 --mysql-db=demo --mysql-user=root --mysql-password=oracle --mysql-port=3306 --mysql-host=mysqlserver01 --time=60 --oltp-read-only=off --max-requests=0 --threads=8 run

##cleanup

sysbench --test=oltp --mysql-db=test --mysql-user=root --mysql-password=oracle cleanup