InnoDB On-Disk Structures(四)--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 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 setting of o_direct
is recommended.
转载、节选于
上一篇: 在博客园给自己的博客加入看板娘
推荐阅读
-
InnoDB On-Disk Structures(三)--Tablespaces (转载)
-
InnoDB On-Disk Structures(四)--Doublewrite Buffer (转载)
-
InnoDB On-Disk Structures(五)-- Redo Log & Undo Logs (转载)
-
InnoDB On-Disk Structures--Tables (转载)
-
InnoDB On-Disk Structures(三)--Tablespaces (转载)
-
InnoDB On-Disk Structures(四)--Doublewrite Buffer (转载)
-
InnoDB On-Disk Structures(五)-- Redo Log & Undo Logs (转载)
-
InnoDB On-Disk Structures--Tables (转载)