javahanyutel 2016-07-26
git clone https://github.com/akopytov/sysbench 目录结构 root@itcast01:/home/aiapple/sysbench# ls autogen.sh configure.ac install-sh missing README-WIN.txt ChangeLog COPYING m4 mkinstalldirs sysbench config doc Makefile.am README.md TODO
./autogen.sh ./configure --prefix=/home/sysbench make make install
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
b)运行测试--run
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
c)清理数据(cleanup)