当前位置: 移动技术网 > IT编程>数据库>Mysql > InnoDB On-Disk Structures(四)--Doublewrite Buffer (转载)

InnoDB On-Disk Structures(四)--Doublewrite Buffer (转载)

2019年08月21日  | 移动技术网IT编程  | 我要评论

转载、节选于 

 

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.

 

转载、节选于 

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网