关于redo writing竞争

简介:      When LGWR wakes up, it first takes the redo writing latch to update the SGA variable that shows whether it is active.
     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.

目录
相关文章
|
3月前
|
监控 NoSQL Redis
Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.
Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.
|
SQL Oracle 关系型数据库
oracle等待事件1——高速缓冲内cbc latch
恩。。从今天起,木木同学要认真整理一下oracle中常见的等待事件,通过这部分的学习,希望自己能对oracle内部的结构能有一个更清晰的认识,有兴趣的童鞋一起来哇。
1102 0
|
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等待事件。
1126 0
|
关系型数据库 数据库 Oracle