# slow slave IO\_THREAD

**URL:** <https://forums.percona.com/t/slow-slave-io-thread/5612>\
**Category:** Percona Server for MySQL 5.7\
**Created:** [May 17, 2017, 7:24am UTC](https://forums.percona.com/t/slow-slave-io-thread/5612 "2017-05-17T07:24:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Machiel](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Machiel](https://forums.percona.com/u/Machiel)\
**Post date:** [May 17, 2017, 7:24am UTC](https://forums.percona.com/t/slow-slave-io-thread/5612/1 "2017-05-17T07:24:03Z")

</div>

Hi All  
We currently have a mysql master/slave replication set where the slave has gone into a lag of about 250 000 seconds.

We are running mysql 5.7.14 (from percona repo) and gtid and parallel master and slave processing is enabled.

During the weekend a LOT of data was processed and generated about 300Gb worth of binary logs that has to be processed, which is all good and well.

The two servers are in the same network subnet , connected via gigabit ports on the same switch.

I noticed that the slave\_io\_thread seems to be lagging as it is very far behind compared to the master server binary logs.

As a test, I disabled the slave sql\_thread and let it only sync binary to relay logs.

Looking at the network throughput , we are only getting 6Mb/s

After it synced about 25Gb of data which took an entire night, I enabled sql\_thread and within an hour it was all processed.

I initially though that this was a networking issue, however, when doing an scp from master to slave server writing to the same disk where the relay logs are located, then I get a throughput of about 75-80Mb/s

I have tried to enable slave\_compressed\_protocol however this made it even worse.

I can clearly see that the io\_thread is the bottleneck, but I am out of ideas on how to speed this up.

Any ideas here would be greatly appreciated.

Regards

---

<div class="post-metadata">

**Author:** ![billmask](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/billmask/32/1230_2.png) [@billmask](https://forums.percona.com/u/billmask)\
**Post date:** [June 25, 2018, 6:23pm UTC](https://forums.percona.com/t/slow-slave-io-thread/5612/2 "2018-06-25T18:23:46Z")

</div>

Hi Machiel,

Usually, if the io\_thread is slow without reason, you can do a stop/start of it.  
Was the parameter seconds\_behind\_the\_master equals zero during any time range of the issue?  
Could you please tell if you were using GTID and if the slave had auto\_position setup?  
Thanks in advance  
Marcelo
