使用sysbench测试mysql性能的操作步骤
发表于:2024-10-22 作者:千家信息网编辑
千家信息网最后更新 2024年10月22日,下文给大家带来关于使用sysbench测试mysql性能的操作步骤,感兴趣的话就一起来看看这篇文章吧,相信看完使用sysbench测试mysql性能的操作步骤对大家多少有点帮助吧。sysbench测试
千家信息网最后更新 2024年10月22日使用sysbench测试mysql性能的操作步骤
下文给大家带来关于使用sysbench测试mysql性能的操作步骤,感兴趣的话就一起来看看这篇文章吧,相信看完使用sysbench测试mysql性能的操作步骤对大家多少有点帮助吧。
sysbench测试mysql性能:
安装sysbench 1.0:
apt-get install bzr automake libtool libmysqlclient-dev pkg-config unzip
ln -s /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20.3.14 /usr/lib/libmysqlclient_r.so
wget https://github.com/akopytov/sysbench/archive/1.0.zip -O "sysbench-1.0.zip"
unzip sysbench-1.0.zip
cd sysbench-1.0
./autogen.sh
./configure
make && make install
1.0的oltp.lua路径为--test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua
file I/O performance (文件I/O性能)
scheduler performance (调度性能)
memory allocation and transfer speed (内存分配和传输速度)
POSIX threads implementation performance (POSIX线程执行绩效)
database server performance (OLTP benchmark)(数据库服务器性能)
测试CPU:
/usr/local/bin/sysbench --test=cpu --cpu-max-prime=2000 --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run
测试线程:
/usr/local/bin/sysbench --test=threads --threads=500 --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run
测试IO:
准备:
/usr/local/bin/sysbench --test=fileio --file-total-size=2G --file-test-mode=rndrw --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx prepare
测试:
/usr/local/bin/sysbench --test=fileio --file-total-size=2G --file-test-mode=rndrw --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run
清理:
/usr/local/bin/sysbench --test=fileio --file-total-size=2G --file-test-mode=rndrw --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx cleanup
测试内存:
/usr/local/bin/sysbench --test=memory --memory-block-size=8k --memory-total-size=1G --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run
测试mutex(互斥性能测试):
/usr/local/bin/sysbench --test=mutex --num-threads=100 --mutex-num=100 --mutex-locks=100000 --mutex-loops=10000 --mysql-host=10.0.1.5 --mysql-db=ming --mysql-user=ming --mysql-password=xxxxx run
测试OLTP(数据库服务器性能):
准备:
/usr/local/bin/sysbench --test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua --mysql-table-engine=innodb --mysql-host=10.0.1.5 --mysql-db=ming --oltp-table-size=500000 --oltp-test-mode=complex --oltp-table-size=10 --threads=10 --mysql-user=ming --mysql-password=xxxxx prepare
只读测试:
/usr/local/bin/sysbench --test=./sysbench-1.0/tests/include/oltp_legacy/oltp_simple.lua --mysql-table-engine=innodb --mysql-host=10.0.1.5 --mysql-db=ming --oltp-table-size=500000 --oltp-test-mode=simple --oltp-table-size=10 --threads=10 --mysql-user=ming --mysql-password=xxxx run
读写混合测试:
/usr/local/bin/sysbench --test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua --mysql-table-engine=innodb --mysql-host=10.0.1.5 --mysql-db=ming --oltp-table-size=500000 --oltp-test-mode=complex --oltp-table-size=10 --threads=10 --mysql-user=ming --mysql-password=xxxx run
清理:
/usr/local/bin/sysbench --test=./sysbench-1.0/tests/include/oltp_legacy/oltp.lua --mysql-table-engine=innodb --mysql-host=10.0.1.5 --mysql-db=ming --oltp-table-size=500000 --oltp-test-mode=complex --oltp-table-size=10 --threads=10 --mysql-user=ming --mysql-password=xxxx cleanup
看了以上关于使用sysbench测试mysql性能的操作步骤详细内容,是否有所收获。如果想要了解更多相关,可以继续关注我们的行业资讯板块。
测试
性能
步骤
内存
数据
数据库
服务器
线程
准备
服务
下文
兴趣
内容
文件
更多
板块
篇文章
绩效
行业
资讯
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
网络技术服务商的告知义务
数据库项目ip
市网络安全与信息化工作会议
树莓派跟电脑数据库同步
湖北华为服务器续保调试
俄罗斯与乌克兰网络安全
湘潭软件开发培训去哪好
南城无线网络技术
元神哪些服务器可以一起玩
数据库账户余额表设计
数据库2005服务装不了
河南软件开发的未来发展
完善网络安全制度
c语言软件开发能做哪些
网络技术公司经营范围
电源安全服务器
石家庄建立老人健康数据库
易邮服务器
计算机网络技术的就业目标
兰州网络安全和信息化委员会
服务器系统 ghost
俄罗斯与乌克兰网络安全
网络安全靠大家手抄报8K
共享盘服务器
武汉巨友互联网络科技有限公司
有数据库的软件需要正版系统吗
网络安全和信息化机构
信息网络安全监察省考
无线网络技术导论第三版课后
幼儿园网络安全管理检查表查