sysbench 测试 MySQL数据库
sysbench的oltp脚本
初始化数据
sysbench --test=oltp --num-threads=64 --max-requests=1024 --db-driver=mysql --mysql-socket=/tmp/mysql3306.sock --mysql-table-engine=innodb --mysql-user=root --mysql-host=localhost --mysql-password=111111 --oltp-test-mode=complex --mysql-db=xxx --oltp-table-size=50000 --oltp-num-tables=16 prepare
执行
ysbench --test=oltp --num-threads=64 --max-requests=1024 --db-driver=mysql --mysql-socket=/tmp/mysql3306.sock --mysql-table-engine=innodb --mysql-user=root --mysql-host=localhost --mysql-password=111111 --oltp-test-mode=complex --mysql-db=xxx --oltp-table-size=50000 --oltp-num-tables=16 run
测试后的数据清理
sysbench --test=oltp --num-threads=64 --max-requests=1024 --db-driver=mysql --mysql-socket=/tmp/mysql3306.sock --mysql-table-engine=innodb --mysql-user=root --mysql-host=localhost --mysql-password=111111 --oltp-test-mode=complex --mysql-db=xxx --oltp-table-size=50000 --oltp-num-tables=16 cleanup