Book Image

MariaDB High Performance

By : Pierre Mavro
Book Image

MariaDB High Performance

By: Pierre Mavro

Overview of this book

Table of Contents (18 chapters)
MariaDB High Performance
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Parallel replication


By default, replications are single-threaded (only one event executing at a time). This can lead to performance issues when you're using multisource replication without activating parallel replication. Since MariaDB 10, a pool of separate replication worker threads is available to apply multiple events in parallel. You can go up to 10 times faster when parallel replication is enabled.

To enable parallel replication, add this line in your MariaDB configuration file (my.cnf):

slave-parallel-threads=4

A 0 value means disabled and the maximum value is 16383.

If you're going too high on this value, you may encounter a slowdown.

Other options can be used and adjusted to fine tune parallel replication:

  • slave_parallel_max_queued: This sets the memory limit for the SQL threads.

  • slave_domain_parallel_threads: This shows how many connections a master can reserve at most (at one time).

  • binlog_commit_wait_count: This reduces I/O on the binary log. This will help parallel replication adoption...