Sysbench
1) Download Sysbench
git clone https://github.com/akopytov/sysbench.git
2) Compile & install
./autogen.sh
./configure--prefix=/home/ddb/tmp/sysbench
Make && make install
3)./sysbench--help
4) Initialize the data
Sysbench--test=parallel_prepare.lua--oltp_tables_count=1--rand-init=on--oltp-table-size=500000000--mysql-host= 127.0.0.1--mysql-port=3306--mysql-user=sys--mysql-password=netease--mysql-db=sbtest--max-requests=0 Prepare
5) Run the test
Sysbench--test=oltp.lua--oltp_tables_count=1--num-threads=100--oltp-table-size=500000000--oltp-read-only=off-- report-interval=10--rand-type=uniform--mysql-host=127.0.0.1--mysql-port=3306--mysql-user=sys--mysql-password= NetEase--mysql-db=sbtest--max-time=1000--max-requests=0 Run
6) Data Cleansing
Sysbench--test=parallel_prepare.lua--oltp_tables_count=1--rand-init=on--oltp-table-size=500000000--mysql-host= 127.0.0.1--mysql-port=3306--mysql-user=sys--mysql-password=netease--mysql-db=sbtest--max-requests=0 cleanup
Tpcc
1) Download Tpcc-mysql
BZR Branch Lp:~percona-dev/perconatools/tpcc-mysql
2) Compile and install
CD src
Make
Export Ld_library_path= $MYSQL _home/lib
Export C_include_path= $MYSQL _home/include
Export path= $MYSQL _home/bin: $PATH
3) Creating table structures and indexes
Mysql>create database TPCC;
Mysql>source Create_table.sql
Mysql>source Add_fkey_idx.sql
4) Guide data
./tpcc_load [Server] [DB] [user] [pass] [Warehouse_num]
5) Run the test
./tpcc_start-h server_host-p port-d database_name-u mysql_user-p mysql_password-w warehouse-c connections-r Warmup _time-i running_time-i report-interval-f Report-file
MySQL performance test sysbench and TPCC installation configuration and use