Faster MySQL replication using dependencies
Abhinav Sharma Facebook Inc.
Faster MySQL replication using dependencies Abhinav Sharma - - PowerPoint PPT Presentation
Faster MySQL replication using dependencies Abhinav Sharma Facebook Inc. Motivation Replication lag is bad news Stale reads on slaves Potential data-loss 2 Motivation Can we eliminate replication lag? No! There will always
Abhinav Sharma Facebook Inc.
2
3
4
5
6
Tx1 Tx2 Tx3 Tx1 Tx2 Tx3 Tx1 Tx2 Tx3
7
8
Tx1 Tx2 Tx3 Tx1 Tx2 Tx3 Tx4 Tx5 Tx1 Tx2 Tx3
9
10
11
Tx1 Tx2 Tx3 Tx1 Tx2 Tx3 Tx4 Tx5 Tx1 Tx2 Tx4 Tx4 Tx3 Tx5 Tx5
12
13
14
Tx1 Tx2 Tx1 Tx2
15
Tx1 Tx2 Tx3 Tx1 Tx2 Tx3 Tx4 Tx5 Tx4 Tx5
Tx1 Tx2 Tx3 Tx4 Tx5
16
17
Checkpointing Force Order
Execution done Commit done
Wait for commit
Prev Checkpoint Next Checkpoint
Commit out of order Execute out of order but commit after checkpoint
RO transactions always see prefix of the log
18
5000 10000 15000 20000 25000 30000 50 100 150 200 250 300
TPS Threads
sysbench write-only
Master Slave Old Slave
~4-5x ~1.3x
19
1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 50 100 150 200 250 300
TPS Threads
Fully conflicting workload
Master Slave Old Slave
MySQL 8.x WRITE_SET will also behave like this
20
21
22
23
24
25