
double write
InnoDB关键特性之double write - GeaoZhang - 博客园
【MySQL】double write 浅析_ITPUB博客
https://dev.mysql.com/doc/refman/8.0/en/innodb-doublewrite-buffer.html
為什麼Oracle沒有double write———Roger
Doublewrite Buffer
The doublewrite buffer is a storage area located in the system tablespace where InnoDB
writes pages that are flushed from the InnoDB buffer pool, before the pages are written to
their proper positions in the data file. Only after flushing and writing pages to the
doublewrite buffer, does InnoDB write pages to their proper positions. If there is an
operating system, storage subsystem, or mysqld process crash in the middle of a page
write, InnoDB can later find a good copy of the page from the doublewrite buffer during
crash recovery.
Although data is always written twice, the doublewrite buffer does not require twice as
much I/O overhead or twice as many I/O operations. Data is written to the doublewrite
buffer itself as a large sequential chunk, with a single fsync()call to the operating system.
The doublewrite buffer is enabled by default in most cases. To disable the doublewrite
buffer, set innodb_doublewrite to 0.
If system tablespace files (“ibdata files”) are located on Fusion-io devices that support
atomic writes, doublewrite buffering is automatically disabled and Fusion-io atomic writes
are used for all data files. Because the doublewrite buffer setting is global, doublewrite
buffering is also disabled for data files residing on non-Fusion-io hardware. This feature is
only supported on Fusion-io hardware and is only enabled for Fusion-io NVMFS on Linux.
To take full advantage of this feature, an innodb_flush_method setting ofO_DIRECTis
recommended.
Doublewrite Buffer
Doublewrite缓冲区是位于系统表空间中的存储区域,在将⻚⾯写⼊数据⽂件中的正确位置之
前,InnoDB写⼊从InnoDB缓冲池中刷新的⻚⾯。只有在将⻚⾯刷新并写⼊双写缓冲区后,才
能InnoDB将⻚⾯写⼊正确的位置。如果在⻚⾯写⼊过程中存在操作系统,存储⼦系统或
mysqld 进程崩溃,则InnoDB可以在崩溃恢复期间从doublewrite缓冲区中找到该⻚⾯的良好
评论