Detailed mysql principle ~ sync_binlog

Details about the profile parameters sync_binlog
a parameter
   consists of two parts. 1 2 dump_thread local disk sync timing  
   sync_binlog = 0
    . 1 log without binary sync brush plate, depending on an OS brush disc mechanism
    2 after notification thread DUMP flush stage transmission Event. (Not enter sync phase)
   sync_binlog =. 1
     . 1 binary log after every sync queues are formed for the brush disc is approximately equal to each sync group commit brushing disc 
     2 after the sync notification thread DUMP transmission phase the Event
   sync_binlog = N
    . 1 in the binary log after forming the brush disc for sync sync queue specified times
     2 DUMP thread notifies the transmission stage flush Event.
Two groups submitted technical binlog
   1 Flush: All threads are already registered to write binary log cache
   2 Sync: binary log cache data will sync to disk, when sync_binlog = 1 binary log all transactions in the queue cache permanently written to disk
   3 Commit: leader sequence according to commit the transaction call storage engine (InnoDB layer)
Submit three details
  of how to increase the number of one-time group commit
   Group to binlog_group_commit_sync_delay milliseconds until the number reaches binlog_group_commit_sync_no_delay_count transaction will be.
Four specific process
  storage engine (InnoDB) Prepare ----> Database upper (Binary Log) Flush Stage ----> Sync Stage ----> transfer storage engine (InnoDB) Commit stage.
Five summary
  1 sync_binlog If non 1 may lead to the library than the main library and more data. so it is recommended to use in critical environments = 1 sync_binlog
  2 different values for when sync_binlog get binlog dump thread are influential
  3 dump thread indeed binlog cache obtained
  4 so-called sync_binlog related to the sync group stage is the submission of binlog

 This article mostly large source of eight strange god related articles summarize, it is noted

Guess you like

Origin www.cnblogs.com/danhuangpai/p/11445035.html
Recommended