ReplicationFeatures/ParallelSlave
Contents |
[edit] Parallel execution of row-based replication events on slave
[edit] Provides
Increases throughput of replication in terms of transactions per second. Reduces replication latency.
[edit] Use case:
Currently, replication does not scale well on multi-core machines. The single slave thread execute replication events one by one and have sometimes problems with a load produced on the master by concurrent multiple client connections. MySQL Cluster Replication benefits from parallelization as well because workload on the master side is generated by multiple machines.
[edit] Limitations:
Limitations that will be removed in later versions:
- May crash
- Tables must have primary key of an integer type
- Only parallel execution for INSERTs and DELETEs, not for UPDATEs. (No support for Update_rows event)
- If slave crashes during commit, then only part of a transaction can have been committed.
Limitations that will not be removed soon:
- Only works with transactional storage engines
- Only works with row-based events
- All transactions on slave should use SERIALIZABLE isolation level
[edit] User interface:
- The server configuration parameter
--slave_parallel_workers=..., zero by default
- SHOW PROCESSLIST displays all engaged workers
- Parallel mode is not active by default, to set it invoke
set @@global.slave_exec_mode='strict,parallel';
[edit] References
- WL#4648 Multi-threaded slave for row-based replication
[edit] Downloads
- Pre-release 0.1
[edit] Thanks:
MySQL Replication and MySQL Cluster Team, including Mats, Lars, Andrei, Tomas, Jonas, Mikael.