关于html:Log-Buffer有什么用处

58次阅读

共计 990 个字符,预计需要花费 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.

Log Buffer 是内存中不同于 Buffer Pool 的一部分会缓存将写入到磁盘中的数据。Log Buffer 的大小可用 innodb_log_buffer_size 参数设置。默认大小是 16MB。Log Buffer 的内容会周期性的刷新到磁盘。大的 Log Buffer 能够包容大的事务无需将数据写入到 redo 日志,缩小与磁盘的交互。事务中如果有大量的 dml 操作,能够思考增大 Log Buffer 的值,缩小磁盘 IO。

The innodb_flush_log_at_trx_commit variable controls how the www.cungun.comcontents of the log buffer are written and flushed to disk. The innodb_flush_log_at_timeout variable controls log flushing frequency.

innodb_flush_log_at_trx_commit 参数可能管制 log buffer 写入和刷新到页游磁盘。

innodb_flush_log_at_timeout 参数能管制刷新的频率。

For related information, see Memory Configuration, and Section 8.5.4,“Optimizing InnoDB Redo Logging”.

正文完
 0