详解MySQL基准测试和sysbench工具
链接:https://reurl.cc/Xkok0R
作者:编程迷思
什么是基准测试
基准测试的作用
基准测试的指标
基准测试的分类
sysbench简介
sysbench安装
wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"
unzip sysbench-1.0.zip
cd sysbench-1.0
yum install automake libtool –y
./autogen.sh
./configure
export LD_LIBRARY_PATH=/usr/local/mysql/include #这里换成机器中mysql路径下的include
make
make install
[root@test sysbench-1.0]# sysbench --version
sysbench 1.0.9
sysbench语法
sysbench [options]...[testname][command]
sysbench --test=./tests/include/oltp_legacy/oltp.lua
sysbench ./tests/include/oltp_legacy/oltp.lua
sysbench使用举例
sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.10.10--mysql-port=3306--mysql-user=root --mysql-password=123456--oltp-test-mode=complex --oltp-tables-count=10--oltp-table-size=100000--threads=10--time=120--report-interval=10 prepare
sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.10.10--mysql-port=3306--mysql-user=root --mysql-password=123456--oltp-test-mode=complex --oltp-tables-count=10--oltp-table-size=100000--threads=10--time=120--report-interval=10 run >>/home/test/mysysbench.log
sysbench ./tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.10.10--mysql-port=3306--mysql-user=root --mysql-password=123456 cleanup
测试结果
建议
推荐阅读:
5T技术资源大放送!包括但不限于:C/C++,Linux,Python,Java,PHP,人工智能,单片机,树莓派,等等。在公众号内回复「1024」,即可免费获取!!
评论