关键语句:
ll /local/sysbenchtest/sysbench-0.5/sysbench/tests/db
--查看lua脚本
/usr/local/mysql/bin/mysql -u root -p
--进入mysql
1,创建表
sysbench --test=/local/sysbenchtest/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=1000000 --mysql-table-engine=innodb --mysql-user=root --mysql-port=3306 --mysql-host=localhost --mysql-db=test prepar
2,进行oltp测试
sysbench --test=/local/sysbenchtest/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=1000000 --mysql-table-engine=innodb --mysql-user=root --mysql-port=3306 --mysql-host=localhost --mysql-db=test --max-requests=0 --max-time=600 --num-threads=512 --report-interval=10 run
3,清表
sysbench --test=/local/sysbenchtest/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=1000000 --mysql-table-engine=innodb --mysql-user=root --mysql-port=3306 --mysql-host=localhost --mysql-db=test cleanup