Heim  >  Artikel  >  Datenbank  >  进行mysql压力测试需要注意的几点_MySQL

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

WBOY
WBOYOriginal
2016-06-01 12:58:48921Durchsuche

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、读写延时 数据的话,也应该一并关注。

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn