MySQL Forums
Forum List  »  Replication

Re: mysql 5.7 replication - slave_parallel_workers and slave_pending_jobs_size_max
Posted by: Adam Nelson
Date: September 05, 2017 11:38AM

For Group Replication ... any server in the group could be the primary (master) or the (slave). For example you have HostA, B, and C ... Host A is the Primary and goes down for maintenance. Host C (random selection) is now the Primary. When Host A comes back up and rejoins the cluster it is now technically a slave. So in the case of Group Replication you would want every host configured with `slave_parallel_type = LOGICAL_CLOCK` and `slave_parallel_workers = 20`.

Unless you are running a very large amount of traffic, 20 slave_parallel_workers is overkill. I've got a system running about 2000 writes/s and north of 1.5 million read/s that only runs 5 slave_parallel_workers and never falls more than 1 or 2 queries behind. It's a value that may require experimentation to get correct as it entirely depends on your traffic load.

As for slave_pending_jobs_size_max, it should be set to larger than max_allowed_packet per the documentation. You currently have it set for 4x the max_allowed_packet. Unless you are sending 256M inserts on a regular basis, I would argue you could reduce this to 2x the max_allowed_packet or even to just over the max_allowed_packet.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: mysql 5.7 replication - slave_parallel_workers and slave_pending_jobs_size_max
1255
September 05, 2017 11:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.