MySQL主从复制优化参数

建议调整的参数如下:
innodb_buffer_pool_size,4G,mysqld
innodb_flush_log_at_trx_commit,0,mysqld
sync_binlog,0,mysqld
slave_pending_jobs_size_max,134217728,mysqld
innodb_buffer_pool_instances,4,mysqld
innodb_io_capacity,4000,mysqld
innodb_io_capacity_max,8000,mysqld
innodb_doublewrite,0,mysqld

binlog_format,ROW,mysqld

log-bin,{instance_dir}/logs/mysql-bin,mysqld

log_slave_updates,0,mysqld
参考文档

开启组提交,并行复制
2.1 开关并行复制
5.7库##########
主库:
Set global binlog_transaction_dependency_tracking=COMMIT_ORDER;
set global binlog_group_commit_sync_no_delay_count=20;
set global binlog_group_commit_sync_delay =10;

从库
set global slave_parallel_type=LOGICAL_CLOCK
set global slave_parallel_workers=4

8.0库###########

你可能感兴趣的:(mysql,数据库,linux)