MySQL WAL

Original please indicate the source: https://www.cnblogs.com/agilestyle/p/11447794.html

 

WAL: Write-Ahead Logging

First write the log, write to disk. Specifically, when there is a record needs to be updated, InnoDB engine will first record written to redo log inside, and updates the memory, this time to update the calculation is complete. Meanwhile InnoDB engine in the system is relatively free time, this operation will update the record to disk.

 

WAL mechanism is mainly due to two aspects
redo log and binlog are sequential write, sequential disk writes faster than random write speed;
set of delivery mechanisms, can greatly reduce the disk IOPS consumption.

 

As long as the redo log and binlog ensure persisted to disk, you can ensure that MySQL abnormal restart, the data can reply.

 

Reference

https://time.geekbang.org/column/article/76161

 

Guess you like

Origin www.cnblogs.com/agilestyle/p/11447794.html