Parallel replication of MariaDB 10--Delay test results

Source: Internet
Author: User

Test parameters:

Sysbench--test=/root/sysbench0.5/sysbench/tests/db/insert.lua--mysql-table-engine=innodb--oltp-table-size= 1000000--max-requests=0--max-time=300--num-threads=16--oltp-tables-count=10--report-interval=10--mysql-host= 10.8.8.100--mysql-port=3312--mysql-user=admin--mysql-password=123456--mysql-db=test Run

10 1 million-row table, concurrent 16 threads, pure insert operation.


MySQL parameters:

Sync_binlog = 0innodb_flush_log_at_trx_commit = 0innodb_flush_method = O_directinnodb_flush_neighbors = 1innodb_buffer _pool_size = 10ginnodb_io_capacity = 500innodb_log_file_size = 512minnodb_log_files_in_group = 3innodb_log_buffer_size = 16M


Normal replication delay:

              Master_Log_File:  mysql-bin.000004          read_master_log_pos:  567748597               relay_log_ file: host-100-relay-bin.000005                 relay_log_pos: 66853042        relay_ master_log_file: mysql-bin.000003              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: 469504741

There's 1117MB left, not after.

MariaDB [(None)]> Select 1024-469504741/1024/1024+567748597/1024/1024;+--------------------------------------- -------+|                                1024-469504741/1024/1024+567748597/1024/1024 |+----------------------------------------------+| 1117.69264221 |+----------------------------------------------+1 row in Set (0.00 sec)


Parallel replication (8 concurrent threads, Gtid mode not turned on) delay:

              Master_Log_File:  mysql-bin.000022          read_master_log_pos:  333773843               relay_log_ file: host-100-relay-bin.000073                 relay_log_pos: 134217580        relay_ master_log_file: mysql-bin.000021              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: 722396020

There's 653MB left, not after.

MariaDB [(None)]> Select 1024-722396020/1024/1024+333773843/1024/1024;+--------------------------------------- -------+|                                 1024-722396020/1024/1024+333773843/1024/1024 |+----------------------------------------------+| 653.38101101 |+----------------------------------------------+1 row in Set (0.00 sec)


Parallel replication (8 concurrent threads, turn on Gtid mode) delay:

              Master_Log_File:  mysql-bin.000002          read_master_log_pos:  365095829               relay_log_ file: host-100-relay-bin.000008                 relay_log_pos: 134217572        relay_ master_log_file: mysql-bin.000001              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: 811005100

There's 598MB left, not after.

MariaDB [(None)]> Select 1024-811005100/1024/1024+365095829/1024/1024;+--------------------------------------- -------+|                                 1024-811005100/1024/1024+365095829/1024/1024 |+----------------------------------------------+| 598.74778080 |+----------------------------------------------+1 row in Set (0.00 sec)


Conclusion:

In my test, parallel replication is more than twice times faster than normal replication.



This article is from the "Spring Yang Technical column" blog, please be sure to keep this source http://hcymysql.blog.51cto.com/5223301/1433108

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.