码迷,mamicode.com
首页 > 数据库 > 详细

MySQL 测试工具 sysbench

时间:2018-07-12 13:12:00      阅读:143      评论:0      收藏:0      [点我收藏+]

标签:install   mode   数据   工具   www.   pre   htm   logs   table   

1、配置 epel 源安装 sysbench

yum install -y sysbench

2、初始化数据

sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.1.226 --mysql-port=3306 --mysql-user=root --mysql-password=MySQL5.7 --oltp-test-mode=complex --oltp-tables-count=10 --oltp-table-size=100000 --threads=10 --time=120 --report-interval=10 --db-driver=mysql prepare

3、执行测试

sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.1.226 --mysql-port=3306 --mysql-user=root --mysql-password=MySQL5.7 --oltp-test-mode=complex --oltp-tables-count=10 --oltp-table-size=100000 --threads=10 --time=120 --db-driver=mysql --report-interval=10 run 

4、清理数据

sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.1.226 --mysql-port=3306 --mysql-user=root --db-driver=mysql --oltp-tables-count=10 --mysql-password=MySQL5.7 cleanup

查看文档:https://www.cnblogs.com/kismetv/p/7615738.html

MySQL 测试工具 sysbench

标签:install   mode   数据   工具   www.   pre   htm   logs   table   

原文地址:http://blog.51cto.com/linux10000/2140808

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!