We’ve been having a problem with MySQL replication at VividCortex. Replicas periodically tend to fall behind and we couldn’t really figure out how to speed things up. It wasn’t about resources. The replicas have plenty of CPU and I/O available. We’re also using multithreaded replication (a.k.a. MTR) but most of the replication threads were idle.
One thing that we decided to try out was the new
LOGICAL_CLOCK
parallelization policy introduced in
MySQL 5.7.2. Here’s what the MySQL reference manual says about
slave-parallel-type
:
When using a multi-threaded slave
(slave_parallel_workers
is greater than 0), this
option specifies the policy used to decide which transactions are
allowed to execute in …