关于redo writing竞争

简介:
 When LGWR wakes up, it first takes the redo writing latch to update the SGA variable that shows whether it is active. This prevents other Oracle processes from posting LGWR needlessly. LGWR then takes the redo allocation latch to determine how much redo might be available to write (subject to the release of the redo copy latches). If none, it takes the redo writing latch again to record that it is no longer active, before starting another rdbms ipc message wait.

     If there is redo to write, LGWR then inspects the latch recovery areas for the redo copy latches (without taking the latches) to determine whether there are any incomplete copies into the log buffer. For incomplete copies above the sync RBA, LGWR just defers the writing of that block and subsequent log buffer blocks. For incomplete copies below the sync RBA, LGWR sleeps on a LGWR wait for redo copy wait event, and is posted when the required copy latches have been released. The time taken by LGWR to take the redo writing and redo allocation latches and to wait for the redo copy latches is accumulated in the redo writer latching time statistic.

      (Prior to release 8i, foreground processes held the redo copy latches more briefly because they did not retain them for the application of the change vectors. Therefore, LGWR would instead attempt to assure itself that there were no ongoing copies into the log buffer by taking all the redo copy latches.)

     After each redo write has completed, LGWR takes the redo allocation latch again in order to update the SGA variable containing the base disk block for the log buffer. This effectively frees the log buffer blocks that have just been written, so that they may be reused. 

相关文章
|
存储 运维 关系型数据库
庖丁解InnoDB之Undo LOG
Undo Log是InnoDB十分重要的组成部分,它的作用横贯InnoDB中两个最主要的部分,并发控制(Concurrency Control)和故障恢复(Crash Recovery),InnoDB中Undo Log的实现亦日志亦数据。本文将从其作用、设计思路、记录内容、组织结构,以及各种功能实现等方面,整体介绍InnoDB中的Undo Log,文章会深入一定的代码实现,但在细节上还是希望用抽象的实现思路代替具体的代码。本文基于MySQL 8.0,但在大多数的设计思路上MySQL的各个版本都是一致的。
382 3
|
存储 缓存 安全
庖丁解InnoDB之REDO LOG
磁盘数据库为了在保证数据库的原子性(A, Atomic) 和持久性(D, Durability)的同时,还能以灵活的刷盘策略来充分利用磁盘顺序写的性能,会记录REDO和UNDO日志,即ARIES方法。本文将重点介绍REDO LOG的作用,记录的内容,组织结构,写入方式等内容,希望读者能够更全面准确的理解REDO LOG在InnoDB中的位置。本文基于MySQL 8.0代码。
938 1
|
SQL Oracle 关系型数据库
oracle等待事件1——高速缓冲内cbc latch
恩。。从今天起,木木同学要认真整理一下oracle中常见的等待事件,通过这部分的学习,希望自己能对oracle内部的结构能有一个更清晰的认识,有兴趣的童鞋一起来哇。
1078 0
|
存储 运维 关系型数据库
庖丁解InnoDB之UNDO LOG
本文将从其作用、设计思路、记录内容、组织结构,以及各种功能实现等方面,整体介绍InnoDB中的Undo Log​。
276 0
庖丁解InnoDB之UNDO LOG
|
SQL 前端开发 rax
被误读的buffer busy waits
uffer busy waits的等待事件网上资料很多,很多人可能误读了buffer busy waits。puber们把你们对buffer busy waits等待事件的理解统统说出来,大家一起讨论学习,共同进步! 最好有实验步骤加以验证,可以让大家完完全全的彻底理解buffer busy waits。
|
SQL 索引 关系型数据库
生产 latch: cache buffers chains等待事件分析
生产 latch: cache buffers chains等待事件分析 一,表面现象:某库CPU冲高,大量latch: cache buffers chains等待事件。
1099 0
|
SQL 关系型数据库 Oracle