# Mysql high IO usage

**URL:** <https://forums.percona.com/t/mysql-high-io-usage/3270>\
**Category:** Other MySQL® Questions\
**Created:** [February 11, 2014, 7:38am UTC](https://forums.percona.com/t/mysql-high-io-usage/3270 "2014-02-11T07:38:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddk](https://avatars.discourse-cdn.com/v4/letter/d/46a35a/32.png) [@ddk](https://forums.percona.com/u/ddk)\
**Post date:** [February 11, 2014, 7:38am UTC](https://forums.percona.com/t/mysql-high-io-usage/3270/1 "2014-02-11T07:38:26Z")

</div>

Hi,

We have not small database (~450Gb, ~30000 tables) and few slave servers for it:

- slave2 (scsi hdd with raid 10)
- slave3 (sas hdd wthout raid)  
but after we doing “optimize” at master server replication at slave3 starts to lag:

1. load on the disk becomes 100%
2. the number of inserts falls
3. lag continues to grow

It seems to be a hardware problem, but if we will get a new copy of Mysql datadir from slave2 (which have no lag) to slave3 - we will get an actual copy of database (when it will catch up). On graphs in cacti we can see that hardware can handle ~100 inserts per second, but when it’s 100% IO - there is only ~30 inserts per second.

What we alredy did:

1. Move relay logs to another hdd
2. disable journal at ext4 and tune it a little (mount opts - rw,noatime,nodiratime,data=writeback)

but no improvement…

What else to tune?

---

<div class="post-metadata">

**Author:** ![yogesh777](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@yogesh777](https://forums.percona.com/u/yogesh777)\
**Post date:** [February 17, 2014, 6:45am UTC](https://forums.percona.com/t/mysql-high-io-usage/3270/2 "2014-02-17T06:45:45Z")

</div>

is this problem appears during optimize replicates to slave and optimize is in progress or optimize completed on both master/slave and slave catches up master??  
In first case you can run optimize on master ( do not replicate session commands “set sql\_log\_bin=0” ) and then on slave, in this case your slave will not lag during optimize.

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [February 24, 2014, 1:34am UTC](https://forums.percona.com/t/mysql-high-io-usage/3270/3 "2014-02-24T01:34:12Z")

</div>

Hi,

I would suggest to read this blog post. [url][http://www.mysqlperformanceblog.com/2013/01/03/is-there-a-room-for-more-mysql-io-optimization/[/url]](http://www.mysqlperformanceblog.com/2013/01/03/is-there-a-room-for-more-mysql-io-optimization/%5B/url%5D)
