InnoDB内存架构之日志缓冲区

在这里插入图片描述

1 问题背景

前面研究了InnoDB内存架构之自适应Hash索引,今天研究下日志缓冲区。

2 回顾

InnoDB内存架构如下图所示:

在这里插入图片描述

3 日志缓冲区

原文
The log buffer is the memory area that holds data to be written to the log files on disk. Log buffer size is defined by the innodb_log_buffer_size variable. The default size is 16MB. The contents of the log buffer are periodically flushed to disk. A large log buffer enables large transactions to run without the need to write redo log data to disk before the transactions commit. Thus, if you have transactions that update, insert, or delete many rows, increasing the size of the log buffer saves disk I/O.

日志缓冲区在内存区域中,该区域存储的数据将被写入到磁盘上的日志文件。innodb_log_buffer_size变量表示日志缓冲区的大小,默认大小是16MB。日志缓冲区的内容会稍后刷新到磁盘中。一个巨大的日志缓冲区允许运行大量的事务时,在事务提交前无需写入redo日志数据到磁盘上。因此,如果你有更新、插入或者删除多行的事务,需要增加日志缓冲区的大小来降低磁盘IO

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值