Home > Database > Mysql Tutorial > body text

进行mysql压力测试需要注意的几点_MySQL

WBOY
Release: 2016-06-01 12:58:48
Original
921 people have browsed it

1、填充测试数据比物理内存还要大,至少超过innodb_buffer_pool_size 值,不能将数据全部装载到内存中,除非你的本意就想测试全内存状态下的MySQL性能。

2、每轮测试完成后,都重启mysqld实例,并且用下面的方法删除系统cache,释放swap(如果用到了swap的话),甚至可以重启整个OS。

[root@imysql.com]# sync -- 将脏数据刷新到磁盘

[root@imysql.com]# echo 3 >/proc/sys/vm/drop_caches -- 清除OS Cache

[root@imysql.com]# swapoff -a &&swapon –a

3、压测结果除了tps/TpmC指标外,还应该关注压测期间的系统负载数据,尤其是 iops、iowait、svctm、%util、每秒I/O字节数(I/O吞吐)、事务响应时间(tpcc-mysql/sysbench 打印的测试记录中均有)。另外,如果I/O设备能提供设备级 IOPS、读写延时 数据的话,也应该一并关注。

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!