您好,登錄后才能下訂單哦!
sync_binlog
Command-Line Format | --sync-binlog=# | ||
System Variable | Name | sync_binlog | |
Variable Scope | Global | ||
Dynamic Variable | Yes | ||
Permitted Values (32-bit platforms) | Type | integer | |
Default | 0 | ||
Min Value | 0 | ||
Max Value | 4294967295 | ||
Permitted Values (64-bit platforms) | Type | integer | |
Default | 0 | ||
Min Value | 0 | ||
Max Value | 4294967295 |
If the value of this variable is greater than 0, the MySQL server synchronizes its binary log to disk (using fdatasync()) after sync_binlog commit groups are written to the binary log. The default value of sync_binlog is 0, which does no synchronizing to disk—in this case, the server relies on the operating system to flush the binary log's contents from time to time as for any other file. A value of 1 is the safest choice because in the event of a crash you lose at most one commit group from the binary log. However, it is also the slowest choice (unless the disk has a battery-backed cache, which makes synchronization very fast).
百度翻譯:如果這個(gè)變量的值大于0,MySQL服務(wù)器同步二進(jìn)制日志到磁盤(使用fdatasync())后sync_binlog犯組寫入二進(jìn)制日志。sync_binlog的默認(rèn)值是0,并沒有同步在這種情況下,磁盤,服務(wù)器依賴于操作系統(tǒng)的二進(jìn)制日志的內(nèi)容刷新時(shí)間為任何其他文件。一個(gè)1的值是最安全的選擇,因?yàn)樵谝粋€(gè)崩潰的事件,你失去了最一個(gè)提交組從二進(jìn)制日志。然而,它也是最慢的選擇(除非磁盤具有電池備份的高速緩存,這使得同步非??欤?。免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。