sync_binlog=0 ,表示写binlog不立即刷新磁盘,由系统决定什么时候刷新磁盘。从库对数据安全性要求没那么高,可以设置sync_binlog=0。
sync_binlog=1,每次写binlog都刷新磁盘,安全性高,性能差。
sync_binlog=N,写N次binlog才刷新磁盘。
innodb_flush_log_at_trx_commit=0,每隔一秒钟,把事务日志刷新到磁盘。从库对数据安全性要求没那么高,可以设置innodb_flush_log_at_trx_commit=2。
innodb_flush_log_at_trx_commit=1,每次事务都刷新到磁盘。
innodb_flush_log_at_trx_commit=2,每次事务都不主动刷新磁盘,由系统决定什么时候刷新磁盘。
文章持续更新,可以微信搜一搜「 一灯架构 」第一时间阅读更多技术干货。
欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) | Powered by Discuz! X3.4 |