Share this
New replication features in MySQL 5.6
by Pythian Marketing on Oct 14, 2011 12:00:00 AM
This post was thought of as an attempt to make some performance test with new multi-threaded replication in 5.6, at least that was my initial intention. Based on Luis Soarez – Replication Team Leader in Oracle – post. I wanted to play with new set of variables and features in order to understand how new multi-threaded replication works and make some performance tests.
First impressions:
=================
I will start with my negative impressions about how to setup new replication features:
– Lack of documentation: I know this is a labs release and most of new features are not documented yet, I’ve just found the Luis blog which has some definitions but is mostly an overview than a manual.
– Variables not present: mts% variables are no longer present in last release.
Good impressions:
– Easy to set up replication.
– Replication looks very stable.
Installation:
============
This was the worst and one of the harder task I’ve done here, it’s a nightmare. First of all, lack of documentation only turns this trivial task into an issue. I was expecting to have this working from source code, just compiling the proper version but this didn’t work as expected.
I’ve downloaded different sources from https://labs.mysql.com/ for my VM (Ubuntu 11 32bit), but after compiling and finally getting it working I realized about the lack of multi-threaded support (don’t ask why)
After all I get a functional instance working:
mysql> status
--------------
mysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (i686) using readline 6.1
Connection id: 6
Current database:
Current user: root@pancho-VirtualBox.local
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.6.3-labs-multi-threaded-slave MySQL Community Server (GPL)
Protocol version: 10
Connection: 192.168.56.102 via TCP/IP
Server characterset: latin1
Db characterset: latin1
Client characterset: latin1
Conn. characterset: latin1
TCP port: 3306
Uptime: 4 min 1 sec
Threads: 2 Questions: 13 Slow queries: 0 Opens: 52 Flush tables: 1 Open tables: 45 Queries per second avg: 0.053
--------------
To check if everything was working as expected I’ve followed Luis instructions. First trying to identify mts mts variables:
mysql> show global variables like 'mts%';
Empty set (0.00 sec)
Hey!!! where are those variables? Let’s try another approach:
mysql> show global variables like '%slave%';
+-----------------------------+----------+
| Variable_name | Value |
+-----------------------------+----------+
| init_slave | |
| log_slave_updates | OFF |
| slave_checkpoint_group | 512 |
| slave_checkpoint_period | 300 |
| slave_compressed_protocol | OFF |
| slave_exec_mode | STRICT |
| slave_load_tmpdir | /tmp |
| slave_net_timeout | 3600 |
| slave_parallel_workers | 0 |
| slave_pending_jobs_size_max | 16777216 |
| slave_skip_errors | OFF |
| slave_sql_verify_checksum | ON |
| slave_transaction_retries | 10 |
| slave_type_conversions | |
| sql_slave_skip_counter | 0 |
+-----------------------------+----------+
15 rows in set (0.00 sec)
Weird, they are no longer present and lack of documentation makes this harder to continue, let’s try to see what to configure based in blog:
1- Added some configuration lines:
root@slave:/usr/local/mysql# cat /etc/my.cnf |grep repo
relay_log_info_repository=TABLE
master_info_repository=TABLE
This 2 magical lines finally fixed an old security issue of storing replication credentials in a plain text file, now this information is stored in 2 tables inside mysql db:
mysql> select * from slave_relay_log_info\G
*************************** 1. row ***************************
Master_id: 2
Number_of_lines: 6
Relay_log_name: ./slave-relay-bin.000001
Relay_log_pos: 4
Master_log_name: master-bin.000002
Master_log_pos: 114
Sql_delay: 0
Number_of_workers: 1
1 row in set (0.00 sec)
mysql> select * from slave_master_info\G
*************************** 1. row ***************************
Master_id: 2
Number_of_lines: 20
Master_log_name: mysql-bin.000008
Master_log_pos: 605454111
Host: 192.168.56.101
User_name: root
User_password: admin
Port: 3306
Connect_retry: 60
Enabled_ssl: 0
Ssl_ca:
Ssl_capath:
Ssl_cert:
Ssl_cipher:
Ssl_key:
Ssl_verify_server_cert: 0
Heartbeat: 1800
Bind:
Ignored_server_ids: 0
Uuid: 9f5b7139-daf5-11e0-86a8-080027fcf84b
Retry_count: 86400
1 row in set (0.00 sec)
Cool right :-) ?
I know I know, it could be encrypted but is better than nothing, at least a hacker needs to gain access to db first.
2- Checking slave status and setting number of workers:
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.101
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000008
Read_Master_Log_Pos: 114
Relay_Log_File: slave-relay-bin.000014
Relay_Log_Pos: 267
Relay_Master_Log_File: mysql-bin.000008
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 114
Relay_Log_Space: 583
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: 9f5b7139-daf5-11e0-86a8-080027fcf84b
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
1 row in set (0.00 sec)
mysql> STOP SLAVE;
Query OK, 0 rows affected (0.00 sec)
mysql> SET GLOBAL slave_parallel_workers=2;
Query OK,
0 rows affected (0.00 sec)
mysql> START SLAVE;
Query OK, 0 rows affected (0.09 sec)
mysql> SELECT USER,STATE FROM INFORMATION_SCHEMA.PROCESSLIST WHERE SER='system user';
+-------------+------------------------------------------------------------------+
| USER | STATE | +-------------+------------------------------------------------------------------+
| system user | Slave has read all relay log; waiting for the slave I/O thread t |
| system user | Waiting for an event from sql thread |
| system user | Waiting for an event from sql thread |
| system user | Waiting for master to send event |
+-------------+------------------------------------------------------------------+
4 rows in set (0.00 sec)
mysql> select * from mysql.slave_worker_info\G
*************************** 1. row ***************************
Master_id: 2
Worker_id: 0
Relay_log_name:
Relay_log_pos: 0
Master_log_name:
Master_log_pos: 0
Checkpoint_relay_log_name:
Checkpoint_relay_log_pos: 0
Checkpoint_master_log_name:
Checkpoint_master_log_pos: 0
Checkpoint_seqno: 0
Checkpoint_group_size: 64
Checkpoint_group_bitmap:
*************************** 2. row ***************************
Master_id: 2
Worker_id: 1
Relay_log_name:
Relay_log_pos: 0
Master_log_name:
Master_log_pos: 0
Checkpoint_relay_log_name:
Checkpoint_relay_log_pos: 0
Checkpoint_master_log_name:
Checkpoint_master_log_pos: 0
Checkpoint_seqno: 0
Checkpoint_group_size: 64
Checkpoint_group_bitmap:
2 rows in set (0.00 sec)
mysql>
So, all looks good now. Will start some tests, for this task I will run mysqlslap tool in master and check how slave is working with different configurations:
1- Running test with 2 parallel threads and 2 replication workers:
root@pancho-VirtualBox:/usr/local/mysql/bin# mysqlslap --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-execute-number=1000 --auto-generate-sql-load-type=mixed --auto-generate-sql-secondary-indexes=2 -c 2 --create-schema='replication' -T -e InnoDB -i 10 --number-char-cols=10 -S/tmp/mysql.sock
Benchmark
Running for engine InnoDB
Average number of seconds to run all queries: 26.334 seconds
Minimum number of seconds to run all queries: 18.528 seconds
Maximum number of seconds to run all queries: 39.485 seconds
Number of clients running queries: 2
Average number of queries per client: 1000
User time 0.78, System time 0.92
Maximum resident set size 1828, Integral resident set size 0
Non-physical pagefaults 560, Physical pagefaults 1, Swaps 0
Blocks in 240 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 40345, Involuntary context switches 190
root@pancho-VirtualBox:/usr/local/mysql/bin#
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.101
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000008
Read_Master_Log_Pos: 9327097
Relay_Log_File: slave-relay-bin.000014
Relay_Log_Pos: 9325682
Relay_Master_Log_File: mysql-bin.000008
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 9325529
Relay_Log_Space: 9327566
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 2
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: 9f5b7139-daf5-11e0-86a8-080027fcf84b
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Reading event from the relay log
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
1 row in set (0.00 sec)
Max delay detected: 2 secs. Pretty good if we keep in mind this is working on a couple of VMs inside my laptop.
2- Running test with 2 parallel threads and 1 replication worker:
root@pancho-VirtualBox:/usr/local/mysql/bin# mysqlslap --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-execute-number=1000 --auto-generate-sql-load-type=mixed --auto-generate-sql-secondary-indexes=2 -c 2 --create-schema='replication' -T -e InnoDB -i 10 --number-char-cols=10 -S/tmp/mysql.sock
Benchmark
Running for engine InnoDB
Average number of seconds to run all queries: 18.909 seconds
Minimum number of seconds to run all queries: 16.928 seconds
Maximum number of seconds to run all queries: 20.675 seconds
Number of clients running queries: 2
Average number of queries per client: 1000
User time 0.84, System time 0.95
Maximum resident set size 1828, Integral resident set size 0
Non-physical pagefaults 560, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 40088, Involuntary context switches 136
root@pancho-VirtualBox:/usr/local/mysql/bin#
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.101
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000008
Read_Master_Log_Pos: 42351370
Relay_Log_File: slave-relay-bin.000023
Relay_Log_Pos: 18649832
Relay_Master_Log_File: mysql-bin.000008
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 42351370
Relay_Log_Space: 18649995
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: 9f5b7139-daf5-11e0-86a8-080027fcf84b
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
1 row in set (0.00 sec)
mysql>
No delay detected, looks a little bit better with a single replication worker.
3- Running test with 4 parallel threads and 1 replication worker:
root@pancho-VirtualBox:/usr/local/mysql/bin# mysqlslap --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-execute-number=1000 --auto-generate-sql-load-type=mixed --auto-generate-sql-secondary-indexes=2 -c 4 --create-schema='replication' -T -e InnoDB -i 10 --number-char-cols=10 -S/tmp/mysql.sock
Benchmark
Running for engine InnoDB
Average number of seconds to run all queries: 21.709 seconds
Minimum number of seconds to run all queries: 20.720 seconds
Maximum number of seconds to run all queries: 23.031 seconds
Number of clients running queries: 4
Average number of queries per client: 1000
User time 0.34, System time 2.77
Maximum resident set size 1856, Integral resident set size 0
Non-physical pagefaults 578, Physical pagefaults 1, Swaps 0
Blocks in 16 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 65917, Involuntary context switches 366
root@pancho-VirtualBox:/usr/local/mysql/bin#
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.101
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000008
Read_Master_Log_Pos: 78092135
Relay_Log_File: slave-relay-bin.000023
Relay_Log_Pos: 54390597
Relay_Master_Log_File: mysql-bin.000008
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 78092135
Relay_Log_Space: 54390760
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: 9f5b7139-daf5-11e0-86a8-080027fcf84b
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
1 row in set (0.00 sec)
No delay detected, seems the delay was caused by parallel workers.
After these tests things looks good, no replication issues detected beyond some delay which is expected because of the environment conditions.
Given this, let’s try make this a little bit fun:
3 mysqlslap instance running with 8 threads each in master, this means 24 concurrent threads performing INSERTS, UPDATES and SELECTS.
4 slave_replication_workers configured:
In master:
root@master:/usr/local/mysql/bin# mysqlslap --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-execute-number=1000 --auto-generate-sql-load-type=mixed --auto-generate-sql-secondary-indexes=2 -c 8 --create-schema='replication2' -T -e InnoDB -i 10 --number-char-cols=10 -S/tmp/mysql.sock
Benchmark
Running for engine InnoDB
Average number of seconds to run all queries: 64.774 seconds
Minimum number of seconds to run all queries: 17.968 seconds
Maximum number of seconds to run all queries: 438.106 seconds
Number of clients running queries: 8
Average number of queries per client: 1000
User time 2.72, System time 1.94
Maximum resident set size 2428, Integral resident set size 0
Non-physical pagefaults 799, Physical pagefaults 1, Swaps 0
Blocks in 168 out 24, Messages in 0 out 0, Signals 0
Voluntary context switches 162633, Involuntary context switches 150
root@master:/usr/local/bin# mysqlslap --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-execute-number=1000 --auto-generate-sql-load-type=mixed --auto-generate-sql-secondary-indexes=2 -c 8 --create-schema='replication3' -T -e InnoDB -i 10 --number-char-cols=10 -S/tmp/mysql.sock
Benchmark
Running for engine InnoDB
Average number of seconds to run all queries: 64.689 seconds
Minimum number of seconds to run all queries: 17.625 seconds
Maximum number of seconds to run all queries: 437.981 seconds
Number of clients running queries: 8
Average number of queries per client: 1000
User time 2.68, System time 1.94
Maximum resident set size 2428, Integral resident set size 0
Non-physical pagefaults 813, Physical pagefaults 0, Swaps 0
Blocks in 0 out 696, Messages in 0 out 0, Signals 0
root@master:/usr/local/mysql/bin# mysqlslap –auto-generate-sql –auto-generate-sql-add-autoincrement –auto-generate-sql-execute-number=1000 –auto-generate-sql-load-type=mixed –auto-generate-sql-secondary-indexes=2 -c 8 –create-schema=’replication4′ -T -e InnoDB -i 10 –number-char-cols=10 -S/tmp/mysql.sock
Benchmark
Running for engine InnoDB
Average number of seconds to run all queries: 64.520 seconds
Minimum number of seconds to run all queries: 17.157 seconds
Maximum number of seconds to run all queries: 437.966 seconds
Number of clients running queries: 8
Average number of queries per client: 1000
User time 2.69, System time 2.00
Maximum resident set size 2424, Integral resident set size 0
Non-physical pagefaults 811, Physical pagefaults 0, Swaps 0
Blocks in 0 out 456, Messages in 0 out 0, Signals 0
Voluntary context switches 162597, Involuntary context switches 156
In slave:
mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)
mysql> set global slave_parallel_workers=4;
Query OK, 0 rows affected (0.00 sec)
mysql> start slave;
Query OK, 0 rows affected, 1 warning (0.02 sec)
mysql> show processlist;
+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+------------------+
| 1 | root | localhost | NULL | Query | 0 | init | show processlist |
| 11 | system user | | NULL | Connect | 3 | Waiting for master to send event | NULL |
| 12 | system user | | NULL | Connect | 3 | Slave has read all relay log; waiting for the slave I/O thread to update it | NULL |
| 13 | system user | | NULL | Connect | 3 | Waiting for an event from sql thread | NULL |
| 14 | system user | | NULL | Connect | 3 | Waiting for an event from sql thread | NULL |
| 15 | system user | | NULL | Connect | 3 | Waiting for an event from sql thread | NULL |
| 16 | system user | | NULL | Connect | 3 | Waiting for an event from sql thread | NULL |
+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+------------------+
7 rows in set (0.00 sec)
mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| db1 |
| db2 |
| mysql |
| performance_schema |
| rep_test |
| replication |
| replication1 |
| replication2 |
| replication3 |
| replication4 |
| test |
+——————–+
12 rows in set (0.42 sec)
mysql> show processlist;
+—-+————-+———–+——+———+——+———————————————–+——————+
| Id | User | Host | db | Command | Time | State | Info |
+—-+————-+———–+——+———+——+———————————————–+——————+
| 1 | root | localhost | NULL | Query | 0 | init | show processlist |
| 11 | system user | | NULL | Connect | 416 | Waiting for master to send event | NULL |
| 12 | system user | | NULL | Connect | 0 | Waiting for Slave Worker to release partition | NULL |
| 13 | system user | | NULL | Connect | 35 | Executing event | NULL |
| 14 | system user | | NULL | Connect | 416 | Waiting for an event from sql thread | NULL |
| 15 | system user | | NULL | Connect | 416 | Waiting for an event from sql thread | NULL |
| 16 | system user | | NULL | Connect | 416 | Waiting for an event from sql thread | NULL |
+—-+————-+———–+——+———+——+———————————————–+——————+
7 rows in set (0.00 sec)
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.101
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: master-bin.000004
Read_Master_Log_Pos: 216185850
Relay_Log_File: slave-relay-bin.000010
Relay_Log_Pos: 174327889
Relay_Master_Log_File: master-bin.000004
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 206947624
Relay_Log_Space: 216186321
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 107
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: 9f5b7139-daf5-11e0-86a8-080027fcf84b
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Waiting for Slave Worker to release partition
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
1 row in set (0.00 sec)
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.56.101
Master_User: root
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: master-bin.000004
Read_Master_Log_Pos: 216185850
Relay_Log_File: slave-relay-bin.000010
Relay_Log_Pos: 183566115
Relay_Master_Log_File: master-bin.000004
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 216185850
Relay_Log_Space: 216186321
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: 9f5b7139-daf5-11e0-86a8-080027fcf84b
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
1 row in set (0.02 sec)
mysql>
Max delay detected 100 secs.
As I mentioned before this is not a performance test, this was only an approach of new features and how things work in this release.
Some tips to keep in mind to configure replication in 5.6:
– Configure replication to store the information in tables instead of files by adding two lines to my.cnf. This is a good security improvement and I expect this to become a default in next releases:
relay_log_info_repository=TABLE
master_info_repository=TABLE
– There are new slave% variables (called mts% in Luis blog) which we could configure, in this blog I’ve only used slave_parallel_workers, which indicates the number of threads that will read an apply changes from binary logs.
This is the list of additional variables:
slave_checkpoint_group
slave_checkpoint_period
slave_parallel_workers
slave_pending_jobs_size_max
slave_sql_verify_checksum
We still need some extra investigation of what each of them does and it exceeds the purpose of this blog, as I mentioned before documentation is not something we can find easily.
Conclusions:
=========
Multi-threaded replication is here and seems it will be a part of 5.6 release. This means we will not have the need of using third part tools or strange configurations to improve replication performance.
Regarding performance test results were not too promising, this can’t be evaluated in this environment because tests were performed using a laptop running Windows with only 3GB of RAM and 2 VMs running Ubuntu 11-32 bit with 512M RAM each.
Parallel replication works as expected, I didn’t detect data inconsistencies so I’m very optimistic about new performance test by using a better environment.
Next steps:
=========
We didn’t make performance tests so the next obvious steps are to setup a new good environment (probably something in ECS), and push replication to see how good this works.
Stay tuned!!
Share this
- Technical Track (967)
- Oracle (410)
- MySQL (140)
- Cloud (128)
- Microsoft SQL Server (117)
- Open Source (90)
- Google Cloud (81)
- Microsoft Azure (63)
- Amazon Web Services (AWS) (58)
- Big Data (52)
- Google Cloud Platform (46)
- Cassandra (44)
- DevOps (41)
- Pythian (33)
- Linux (30)
- Database (26)
- Performance (25)
- Podcasts (25)
- Site Reliability Engineering (25)
- PostgreSQL (24)
- Oracle E-Business Suite (23)
- Oracle Database (22)
- Docker (21)
- DBA (20)
- Security (20)
- Exadata (18)
- MongoDB (18)
- Oracle Cloud Infrastructure (OCI) (18)
- Oracle Exadata (18)
- Automation (17)
- Hadoop (16)
- Oracleebs (16)
- Amazon RDS (15)
- Ansible (15)
- Snowflake (15)
- ASM (13)
- Artificial Intelligence (AI) (13)
- BigQuery (13)
- Replication (13)
- Advanced Analytics (12)
- Data (12)
- GenAI (12)
- Kubernetes (12)
- LLM (12)
- Authentication, SSO and MFA (11)
- Cloud Migration (11)
- Machine Learning (11)
- Rman (11)
- Datascape Podcast (10)
- Monitoring (10)
- Apache Cassandra (9)
- ChatGPT (9)
- Data Guard (9)
- Infrastructure (9)
- Oracle Applications (9)
- Python (9)
- Series (9)
- AWR (8)
- High Availability (8)
- Oracle EBS (8)
- Oracle Enterprise Manager (OEM) (8)
- Percona (8)
- Apache Beam (7)
- Data Governance (7)
- Innodb (7)
- Microsoft Azure SQL Database (7)
- Migration (7)
- Myrocks (7)
- Performance Tuning (7)
- Data Enablement (6)
- Data Visualization (6)
- Database Performance (6)
- Oracle Enterprise Manager (6)
- Orchestrator (6)
- RocksDB (6)
- Serverless (6)
- Azure Data Factory (5)
- Azure Synapse Analytics (5)
- Covid-19 (5)
- Disaster Recovery (5)
- Generative AI (5)
- Google BigQuery (5)
- Mariadb (5)
- Microsoft (5)
- Scala (5)
- Windows (5)
- Xtrabackup (5)
- Airflow (4)
- Analytics (4)
- Apex (4)
- Cloud Security (4)
- Cloud Spanner (4)
- CockroachDB (4)
- Data Management (4)
- Data Pipeline (4)
- Data Security (4)
- Data Strategy (4)
- Database Administrator (4)
- Database Management (4)
- Database Migration (4)
- Dataflow (4)
- Fusion Middleware (4)
- Google (4)
- Oracle Autonomous Database (Adb) (4)
- Oracle Cloud (4)
- Prometheus (4)
- Redhat (4)
- Slob (4)
- Ssl (4)
- Terraform (4)
- Amazon Relational Database Service (Rds) (3)
- Apache Kafka (3)
- Apexexport (3)
- Aurora (3)
- Business Intelligence (3)
- Cloud Armor (3)
- Cloud Database (3)
- Cloud FinOps (3)
- Cosmos Db (3)
- Data Analytics (3)
- Data Integration (3)
- Database Monitoring (3)
- Database Troubleshooting (3)
- Database Upgrade (3)
- Databases (3)
- Dataops (3)
- Digital Transformation (3)
- ERP (3)
- Google Chrome (3)
- Google Cloud Sql (3)
- Google Workspace (3)
- Graphite (3)
- Heterogeneous Database Migration (3)
- Liquibase (3)
- Oracle Data Guard (3)
- Oracle Live Sql (3)
- Oracle Rac (3)
- Perl (3)
- Rdbms (3)
- Remote Teams (3)
- S3 (3)
- SAP (3)
- Tensorflow (3)
- Adf (2)
- Adop (2)
- Amazon Data Migration Service (2)
- Amazon Ec2 (2)
- Amazon S3 (2)
- Apache Flink (2)
- Ashdump (2)
- Atp (2)
- Autonomous (2)
- Awr Data Mining (2)
- Cloud Cost Optimization (2)
- Cloud Data Fusion (2)
- Cloud Hosting (2)
- Cloud Infrastructure (2)
- Cloud Shell (2)
- Cloud Sql (2)
- Conferences (2)
- Cosmosdb (2)
- Cost Management (2)
- Cyber Security (2)
- Data Analysis (2)
- Data Discovery (2)
- Data Engineering (2)
- Data Migration (2)
- Data Modeling (2)
- Data Quality (2)
- Data Streaming (2)
- Data Warehouse (2)
- Database Consulting (2)
- Database Migrations (2)
- Dataguard (2)
- Docker-Composer (2)
- Enterprise Data Platform (EDP) (2)
- Etl (2)
- Events (2)
- Gemini (2)
- Health Check (2)
- Infrastructure As Code (2)
- Innodb Cluster (2)
- Innodb File Structure (2)
- Innodb Group Replication (2)
- NLP (2)
- Neo4J (2)
- Nosql (2)
- Open Source Database (2)
- Oracle Datase (2)
- Oracle Extended Manager (Oem) (2)
- Oracle Flashback (2)
- Oracle Forms (2)
- Oracle Installation (2)
- Oracle Io Testing (2)
- Podcast (2)
- Power Bi (2)
- Redshift (2)
- Remote DBA (2)
- Remote Sre (2)
- SAP HANA Cloud (2)
- Single Sign-On (2)
- Webinars (2)
- X5 (2)
- Actifio (1)
- Adf Custom Email (1)
- Adrci (1)
- Advanced Data Services (1)
- Afd (1)
- Ahf (1)
- Alloydb (1)
- Amazon (1)
- Amazon Athena (1)
- Amazon Aurora Backtrack (1)
- Amazon Efs (1)
- Amazon Redshift (1)
- Amazon Sagemaker (1)
- Amazon Vpc Flow Logs (1)
- Analysis (1)
- Analytical Models (1)
- Anisble (1)
- Anthos (1)
- Apache (1)
- Apache Nifi (1)
- Apache Spark (1)
- Application Migration (1)
- Ash (1)
- Asmlib (1)
- Atlas CLI (1)
- Awr Mining (1)
- Aws Lake Formation (1)
- Azure Data Lake (1)
- Azure Data Lake Analytics (1)
- Azure Data Lake Store (1)
- Azure Data Migration Service (1)
- Azure OpenAI (1)
- Azure Sql Data Warehouse (1)
- Batches In Cassandra (1)
- Business Insights (1)
- Chown (1)
- Chrome Security (1)
- Cloud Browser (1)
- Cloud Build (1)
- Cloud Consulting (1)
- Cloud Data Warehouse (1)
- Cloud Database Management (1)
- Cloud Dataproc (1)
- Cloud Foundry (1)
- Cloud Manager (1)
- Cloud Networking (1)
- Cloud SQL Replica (1)
- Cloud Scheduler (1)
- Cloud Services (1)
- Cloud Strategies (1)
- Compliance (1)
- Conversational AI (1)
- DAX (1)
- Data Analytics Platform (1)
- Data Box (1)
- Data Classification (1)
- Data Cleansing (1)
- Data Encryption (1)
- Data Estate (1)
- Data Flow Management (1)
- Data Insights (1)
- Data Integrity (1)
- Data Lake (1)
- Data Leader (1)
- Data Lifecycle Management (1)
- Data Lineage (1)
- Data Masking (1)
- Data Mesh (1)
- Data Migration Assistant (1)
- Data Migration Service (1)
- Data Mining (1)
- Data Monetization (1)
- Data Policy (1)
- Data Profiling (1)
- Data Protection (1)
- Data Retention (1)
- Data Safe (1)
- Data Sheets (1)
- Data Summit (1)
- Data Vault (1)
- Data Warehouse Modernization (1)
- Database Auditing (1)
- Database Consultant (1)
- Database Link (1)
- Database Modernization (1)
- Database Provisioning (1)
- Database Provisioning Failed (1)
- Database Replication (1)
- Database Scaling (1)
- Database Schemas (1)
- Database Security (1)
- Databricks (1)
- Datascape 59 (1)
- DeepSeek (1)
- Duet AI (1)
- Edp (1)
- Gcp Compute (1)
- Gcp-Spanner (1)
- Global Analytics (1)
- Google Analytics (1)
- Google Cloud Architecture Framework (1)
- Google Cloud Data Services (1)
- Google Cloud Partner (1)
- Google Cloud Spanner (1)
- Google Cloud VMware Engine (1)
- Google Compute Engine (1)
- Google Dataflow (1)
- Google Datalab (1)
- Google Grab And Go (1)
- Graph Algorithms (1)
- Graph Databases (1)
- Graph Inferences (1)
- Graph Theory (1)
- GraphQL (1)
- Healthcheck (1)
- Information (1)
- Infrastructure As A Code (1)
- Innobackupex (1)
- Innodb Concurrency (1)
- Innodb Flush Method (1)
- It Industry (1)
- Kubeflow (1)
- LMSYS Chatbot Arena (1)
- Linux Host Monitoring (1)
- Linux Storage Appliance (1)
- Looker (1)
- MMLU (1)
- Managed Services (1)
- Migrate (1)
- Migrating Ssis Catalog (1)
- Migration Checklist (1)
- MongoDB Atlas (1)
- MongoDB Compass (1)
- Newsroom (1)
- Nifi (1)
- OPEX (1)
- ORAPKI (1)
- Odbcs (1)
- Odbs (1)
- On-Premises (1)
- Ora-01852 (1)
- Ora-7445 (1)
- Oracle Cursor (1)
- Oracle Database Appliance (1)
- Oracle Database Se2 (1)
- Oracle Database Standard Edition 2 (1)
- Oracle Database Upgrade (1)
- Oracle Database@Google Cloud (1)
- Oracle Exadata Smart Scan (1)
- Oracle Licensing (1)
- Oracle Linux Virtualization Manager (1)
- Oracle Oda (1)
- Oracle Openworld (1)
- Oracle Parallelism (1)
- Oracle RMAN (1)
- Oracle Rdbms (1)
- Oracle Real Application Clusters (1)
- Oracle Reports (1)
- Oracle Security (1)
- Oracle Wallet (1)
- Perfomrance (1)
- Performance Schema (1)
- Policy (1)
- Prompt Engineering (1)
- Public Cloud (1)
- Pythian News (1)
- Rdb (1)
- Replication Compatibility (1)
- Replication Error (1)
- Retail (1)
- Scaling Ir (1)
- Securing Sql Server (1)
- Security Compliance (1)
- Serverless Computing (1)
- Sso (1)
- Tenserflow (1)
- Teradata (1)
- Vertex AI (1)
- Vertica (1)
- Videos (1)
- Workspace Security (1)
- Xbstream (1)
- May 2025 (1)
- March 2025 (2)
- February 2025 (1)
- January 2025 (2)
- December 2024 (1)
- October 2024 (2)
- September 2024 (7)
- August 2024 (4)
- July 2024 (2)
- June 2024 (6)
- May 2024 (3)
- April 2024 (2)
- February 2024 (1)
- January 2024 (11)
- December 2023 (10)
- November 2023 (11)
- October 2023 (10)
- September 2023 (8)
- August 2023 (6)
- July 2023 (2)
- June 2023 (13)
- May 2023 (4)
- April 2023 (6)
- March 2023 (10)
- February 2023 (6)
- January 2023 (5)
- December 2022 (10)
- November 2022 (10)
- October 2022 (10)
- September 2022 (13)
- August 2022 (16)
- July 2022 (12)
- June 2022 (13)
- May 2022 (11)
- April 2022 (4)
- March 2022 (5)
- February 2022 (4)
- January 2022 (14)
- December 2021 (16)
- November 2021 (11)
- October 2021 (6)
- September 2021 (11)
- August 2021 (6)
- July 2021 (9)
- June 2021 (4)
- May 2021 (8)
- April 2021 (16)
- March 2021 (16)
- February 2021 (6)
- January 2021 (12)
- December 2020 (12)
- November 2020 (17)
- October 2020 (11)
- September 2020 (10)
- August 2020 (11)
- July 2020 (13)
- June 2020 (6)
- May 2020 (9)
- April 2020 (18)
- March 2020 (21)
- February 2020 (13)
- January 2020 (15)
- December 2019 (10)
- November 2019 (11)
- October 2019 (12)
- September 2019 (16)
- August 2019 (15)
- July 2019 (10)
- June 2019 (16)
- May 2019 (20)
- April 2019 (21)
- March 2019 (14)
- February 2019 (18)
- January 2019 (18)
- December 2018 (5)
- November 2018 (16)
- October 2018 (12)
- September 2018 (20)
- August 2018 (27)
- July 2018 (31)
- June 2018 (34)
- May 2018 (28)
- April 2018 (27)
- March 2018 (17)
- February 2018 (8)
- January 2018 (20)
- December 2017 (14)
- November 2017 (4)
- October 2017 (1)
- September 2017 (3)
- August 2017 (5)
- July 2017 (4)
- June 2017 (2)
- May 2017 (7)
- April 2017 (7)
- March 2017 (8)
- February 2017 (8)
- January 2017 (5)
- December 2016 (3)
- November 2016 (4)
- October 2016 (8)
- September 2016 (9)
- August 2016 (10)
- July 2016 (9)
- June 2016 (8)
- May 2016 (13)
- April 2016 (16)
- March 2016 (13)
- February 2016 (11)
- January 2016 (6)
- December 2015 (11)
- November 2015 (11)
- October 2015 (5)
- September 2015 (16)
- August 2015 (4)
- July 2015 (1)
- June 2015 (3)
- May 2015 (6)
- April 2015 (5)
- March 2015 (5)
- February 2015 (4)
- January 2015 (3)
- December 2014 (7)
- October 2014 (4)
- September 2014 (6)
- August 2014 (6)
- July 2014 (16)
- June 2014 (7)
- May 2014 (6)
- April 2014 (5)
- March 2014 (4)
- February 2014 (10)
- January 2014 (6)
- December 2013 (8)
- November 2013 (12)
- October 2013 (9)
- September 2013 (6)
- August 2013 (7)
- July 2013 (9)
- June 2013 (7)
- May 2013 (7)
- April 2013 (4)
- March 2013 (7)
- February 2013 (4)
- January 2013 (4)
- December 2012 (6)
- November 2012 (8)
- October 2012 (9)
- September 2012 (3)
- August 2012 (5)
- July 2012 (5)
- June 2012 (7)
- May 2012 (11)
- April 2012 (1)
- March 2012 (8)
- February 2012 (1)
- January 2012 (6)
- December 2011 (8)
- November 2011 (5)
- October 2011 (9)
- September 2011 (6)
- August 2011 (4)
- July 2011 (1)
- June 2011 (1)
- May 2011 (5)
- April 2011 (2)
- February 2011 (2)
- January 2011 (2)
- December 2010 (1)
- November 2010 (7)
- October 2010 (3)
- September 2010 (8)
- August 2010 (2)
- July 2010 (4)
- June 2010 (7)
- May 2010 (2)
- April 2010 (1)
- March 2010 (3)
- February 2010 (3)
- January 2010 (2)
- November 2009 (6)
- October 2009 (6)
- August 2009 (3)
- July 2009 (3)
- June 2009 (3)
- May 2009 (2)
- April 2009 (8)
- March 2009 (6)
- February 2009 (4)
- January 2009 (3)
- November 2008 (3)
- October 2008 (7)
- September 2008 (6)
- August 2008 (9)
- July 2008 (9)
- June 2008 (9)
- May 2008 (9)
- April 2008 (8)
- March 2008 (4)
- February 2008 (3)
- January 2008 (3)
- December 2007 (2)
- November 2007 (7)
- October 2007 (1)
- August 2007 (4)
- July 2007 (3)
- June 2007 (8)
- May 2007 (4)
- April 2007 (2)
- March 2007 (2)
- February 2007 (5)
- January 2007 (8)
- December 2006 (1)
- November 2006 (3)
- October 2006 (4)
- September 2006 (3)
- July 2006 (1)
- May 2006 (2)
- April 2006 (1)
- July 2005 (1)
No Comments Yet
Let us know what you think