Mysql:DoubleWrite Buffer:类似于redo-log:提高data写性能,间接提高data写安全性!
The doublewrite buffer is a storage area in the system tablespace where InnoDB
writes pages that are flushed from the buffer pool before writing them 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 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 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 of O_DIRECT
is recommended.
相关文章
- Failed to write to mysql.slow_log
- MySQL slow_query_log慢查询日志配置详解
- MYSQL安装流程防止报错
- configure: error: mysql configure failed. Please check config.log for more information.
- MySQL---存储过程详解
- mysql 存储过程
- MySQL Workbench 图形化界面工具
- 验证mysql联合索引最左原则
- 为什么 MySQL 回滚事务也会导致 ibd 文件增大?
- 使用Python3和Golang对MYSQL进行操作
- MYSQL报错ERROR 1372 (HY000): Password hash should be a 41-digit hexadecimal number
- Linux系统下 MYSQL数据库中的数据库文件在本机内迁移 (需暂停服务的方式)
- MySQL修改root密码的各种方法整理
- mysql的binlog和slow_log慢日志
- Relay log read failure: Could not parse relay log event entry. mysql中继日志损坏.mysql relay log损坏
- MySQL开启general_log跟踪sql执行记录