2. sync_binlog
• Where is the difference between 0,1?
• sync_binlog=0
– MySQL just write the binlog into OS buffer
– not use fdatasync(),
– in high concurrent pressure, this value would impact
performance when OS flush buffer into disk
• sync_binlog=1
• Every sync_binlog writes to the binary log, MySQL will call the
fdatasync() to synchronizes its binary log to disk (autocommit =true)
• A value of 1 is the safest choice , but if MySQL cash, we still lose one
binlog event.
• If have a raid battery-backed cache, which makes synchronization very
fast
3. max_binlog_size
• Default value is 100M
• Sometimes we would see some binlog file
excee the value of max_binlog_size
• Because...
– Your binlog format is RBR
– You have big transcation , and MySQL woundn’t
split one transcation into serveral binary logs.