设为首页 加入收藏

TOP

MySQL单台物理机上单实例多库与多实例单库性能测试(二)
2016-12-12 08:15:08 】 浏览:919
Tags:MySQL 单台 物理 机上 实例 单库 性能 测试
l-host=10.11.0.160 --mysql-port=3302--oltp-tables-count=100 --num-threads=32 --max-requests=200000--report-interval=2 run


./sysbench --test=./tests/db/oltp.lua--mysql-table-engine=innodb --oltp-table-size=200000 --mysql-user=thunder--mysql-password=thunder --mysql-host=10.11.0.160 --mysql-port=3303--oltp-tables-count=100 --num-threads=32 --max-requests=200000--report-interval=2 run


./sysbench --test=./tests/db/oltp.lua--mysql-table-engine=innodb --oltp-table-size=200000 --mysql-user=thunder--mysql-password=thunder --mysql-host=10.11.0.160 --mysql-port=3304--oltp-tables-count=100 --num-threads=32 --max-requests=200000--report-interval=2 run


./sysbench --test=./tests/db/oltp.lua--mysql-table-engine=innodb --oltp-table-size=200000 --mysql-user=thunder--mysql-password=thunder --mysql-host=10.11.0.160 --mysql-port=3305--oltp-tables-count=100 --num-threads=32 --max-requests=200000--report-interval=2 run


./sysbench --test=./tests/db/oltp.lua--mysql-table-engine=innodb --oltp-table-size=200000 --mysql-user=thunder--mysql-password=thunder --mysql-host=10.11.0.160 --mysql-port=3306--oltp-tables-count=100 --num-threads=32 --max-requests=200000 --report-interval=2run


./sysbench --test=./tests/db/oltp.lua--mysql-table-engine=innodb --oltp-table-size=200000 --mysql-user=thunder--mysql-password=thunder --mysql-host=10.11.0.160 --mysql-port=3307--oltp-tables-count=100 --num-threads=32 --max-requests=200000--report-interval=2 run


./sysbench --test=./tests/db/oltp.lua--mysql-table-engine=innodb --oltp-table-size=200000 --mysql-user=thunder--mysql-password=thunder --mysql-host=10.11.0.160 --mysql-port=3308--oltp-tables-count=100 --num-threads=32 --max-requests=200000--report-interval=2 run


测试数据:


总结:


当压力源为内网其它机器时,可以看出2台机器TPS/QPS相差不大,其原因为MySQL服务器的物理机网卡已经跑满,此时的瓶颈为网卡。


当压力源为MySQL服务器本机时,可以看出多实例单库的性能要比单实例多库的性能高出20%左右,但是其本机负载也很高,最高达到了225,CPU idle值为0,机器资源已经用光,而单实例多库机器的负载最高为65,机器还有剩余资源,CPUidle值为6左右,此时的瓶颈为CPU。


以上测试没有针对数据库进行较精细的测试,只是通过sqlbench测试相同配置机器多实例单库与单实例多库性能的对比,已经有相关进行参考。


通过上面的数据,肯定很多人会选择多实例单库,而我却没有采用多实例的方式,原因如下:


对于业务来说,一般情况下是服务与数据库不在同一台机器,通过测试可以看出,在网络为瓶颈的情况下,两种方式的TPS/QPS是相差不多的,单实例多库这种方式维护起来又很方便。


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇RMAN还原归档时报RMAN-20242错误.. 下一篇Oracle exists子查询出现rownum引..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目