1

ask

Is there an easy way to judge the impact of IO latency on MySQL performance?

experiment

We are looking for a virtual machine with poor IO, if you can't find it, then you are really rich.

Still start a MySQL instance:

First prepare a table with sysbench:

Then test the performance

Remember to run several times to warm up, only the last result is taken here

When running the pressure, take iostat at the same time:

We found that the disk IO is not saturated, so how much will the normal delay of disk IO affect the performance of this group of MySQL?

Let's simulate a disk in memory using the following command:

We stop the database and move the data directory to the emulated disk

Let's run the performance test again. The sysbench command used is the same as before. Take a look at the results:

We see a fourfold increase in performance, and we can apply for a disk replacement with this set of data

Let's compare the select pressure again:

Select using physical disks:

Emulate a selection of disks using memory:

It can be seen that for this set of select pressures, it is not very useful to replace the disk, and other optimization methods need to be used


What else do you want to know about the technical content of MySQL? Let me know by leaving a message!


爱可生开源社区
426 声望209 粉丝

成立于 2017 年,以开源高质量的运维工具、日常分享技术干货内容、持续的全国性的社区活动为社区己任;目前开源的产品有:SQL审核工具 SQLE,分布式中间件 DBLE、数据传输组件DTLE。


引用和评论

0 条评论