I’m having some serious trouble with replication - this is my setup:
As master, I have AWS RDS (MySQL 5.6), running on something large - about 2.7 TB of data and a lot of transactions coming in.
As slave, MySQL 5.6 running on an EC2 instance, fairly small, but with a reasonably fast disk. It is slowly lagging after the master - I can see the number of relay-log files is growing (currently >4000). I have tried to spot a bottleneck using top, iotop and nethogs, but there doesn’t seem to any. Top shows the CPUs to be mostly idle (80%) or waiting (10%).
I can upgrade the EC2 instance, but I’m not sure what I should get more of - it already has 8 CPUs, 32 GB memory, fast disk and NIC, and as I understand it, MySQL 5.6 is only ever going to run 1 slave thread per database schema no matter what the value of slave_parallel_workers
. What should I upgrade in order to get replication to perform better?