# MySQL 5.7 parallel replication

**URL:** <https://forums.percona.com/t/mysql-5-7-parallel-replication/14935>\
**Category:** Percona Server for MySQL 5.7\
**Tags:** mysql, percona\
**Created:** [March 28, 2022, 4:49pm UTC](https://forums.percona.com/t/mysql-5-7-parallel-replication/14935 "2022-03-28T16:49:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caseyrubick](https://avatars.discourse-cdn.com/v4/letter/c/5f8ce5/32.png) [@caseyrubick](https://forums.percona.com/u/caseyrubick)\
**Post date:** [March 28, 2022, 4:49pm UTC](https://forums.percona.com/t/mysql-5-7-parallel-replication/14935/1 "2022-03-28T16:49:00Z")

</div>

Hello, could you please help with setting up parallel replication?

Currently I tried a lot of things. Here is my master configuratuion on slave:

slave\_parallel\_workers=8  
slave\_parallel\_type=LOGICAL\_CLOCK  
slave-preserve-commit-order=ON

Checked status of workers as per [Estimating potential for MySQL 5.7 parallel replication - Percona Database Performance Blog](https://www.percona.com/blog/2016/02/10/estimating-potential-for-mysql-5-7-parallel-replication/) and found that 4 of 8 workers really works, but SBM still increasing

Tried to increse binlog-group-commit-sync-delay on master but no luck

What should I try? All other parameters (InnoDB, IO and so on) are tuned well

Got an idea to use the following on slave:

set global transaction\_write\_set\_extraction=XXHASH64;  
set global binlog\_transaction\_dependency\_tracking=WRITESET;

Can this help? I think it might broke replica and I cant loose it since it is a PROD

---

<div class="post-metadata">

**Author:** ![CTutte](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ctutte/32/1341_2.png) [@CTutte](https://forums.percona.com/u/CTutte)\
**Post date:** [March 28, 2022, 5:19pm UTC](https://forums.percona.com/t/mysql-5-7-parallel-replication/14935/2 "2022-03-28T17:19:42Z")

</div>

Hi caseyrubick,

Does the replica has same hardware as primary ?  
Did you monitor system resources to find if the bottleneck is CPU/disk/concurrency? or if the replica is swapping?

If SBM increases it can be either to system resources not being enough for the workload, it can be the workload is not parallelizable (i.e if there is a hot table that gets most of the writes) , or if there are long running/frequent DDLs that can be executing on parallel on the primary, but the replica requires the DDL to finish executing before being able to continue applying relay logs.

Above said, it seems you already have configured parallel replication correctly, but it’s likely either the system resources, other configuration or the workload makes the replica lag behind and requires further analysis.

Regards
