There are four conditions that cause LGWR to perform a redo write.

  1. When LGWR is idle, it sleeps on an rdbms ipc message wait with a timeout of 3 seconds (as does DBWn). If this sleep times out and LGWR finds that there is some redo available to write, a background write is performed spontaneously.
  2. Whenever a process allocates space in the log buffer, the number of used log buffer blocks is calculated. If the number of used blocks is greater than or equal to the number of blocks specified by the _log_io_size parameter, and if LGWR is not already active, then LGWR is posted to perform a background write. The default value for _log_io_size is 1/3 of the log buffer expressed in log blocks, with an upper bound equivalent to 1 Mb from release 8.0. As with many other hidden parameters, unless set explicitly, the _log_io_size parameter reports as zero in X$KSPPSV.
  3. When a transaction commits, it generates a commit marker in the redo stream. However, the transaction is not recoverable until the log block containing that commit marker has been flushed to disk. So, before the process finishing the transaction can return a response to the user, it must wait for LGWR to flush that log block to disk. The process therefore posts LGWR and then sleeps on a log file sync wait with a timeout of 1 second. For completeness, the _wait_for_sync parameter can be set to FALSE to avoid waiting for redo to be synced, but doing so voids any guarantee of recoverability for committed transactions upon instance failure.

    Note that commits within recursive calls (such as procedural code execute calls) do not need to sync their redo until a response is about to be returned to the user. Therefore recursive calls just sync the commit RBA of their most recent COMMIT upon return to the user call. They do not sync each commit.

    An SGA variable (kcrfshsb, according to bug 182447) is used to communicate the log block number up to which the redo thread needs to be synced. If several commits occur in distinct transactions before LGWR wakes up, this variable records the highest log block number that needs to be synced, and the commit markers are all flushed to disk in a single redo write. This is sometimes called a group commit.

  4. When DBWn needs to write one or more blocks for which the high RBA is beyond LGWR's on-disk RBA, from Oracle 8i, it places those blocks into its deferred write queue and posts LGWR to sync the highest high RBA, but it does not wait. Instead DBWn continues to process other writes that do not need to be deferred. Prior to release 8i, DBWn used to sleep on a log file sync wait in this case.

最新文章

  1. JavaScript 判断一个对象的数据类型。
  2. openresty 前端开发进阶一之http后端
  3. Linux下Qt的安装与配置
  4. Android --ListView使用ArrayAdapter
  5. WEBBROWSER中模拟鼠标点击(SendMessage/PostMessage)
  6. nginx配置负载均衡与反向代理
  7. SSH调试
  8. Java中关键字super与this的区别
  9. 对 sql server 数据库的备份进行加密
  10. IceMx.Mvc 我的js MVC 框架 二、视图的数据绑定
  11. protobuf转json
  12. Mybatis篇总结
  13. BackBox错误,无法获得锁...资源暂时不可用...无法锁定管理目录
  14. H5与企业微信jssdk集成
  15. Vim 复制粘帖格式错乱问题的解决办法
  16. jenkins乱码解决问题
  17. easyui datagrid 禁止选中行
  18. office2010激活 错误代码0X8007000D,KMS激活0x8007000D错误解决办法,亲测成功激活
  19. Android-普通菜单Menu
  20. Java之IO(一)InputStream和OutputStream

热门文章

  1. Why Use the Widget Factory?
  2. Uncaught TypeError: Cannot read property 'length' of null错误怎么处理?
  3. 阶段1 语言基础+高级_1-3-Java语言高级_05-异常与多线程_第5节 线程池_1_线程池的概念和原理
  4. 1 基础架构:一条sql查询语句如何执行?
  5. Krypton Suite of .NET WinForms Controls
  6. vue组件兄弟间通信
  7. HashMap为什么在多线程下会让cpu100%
  8. 结合element-ui封装的一个分页函数
  9. Symmetric Tree(对称二叉树)
  10. python 安装成linux中的systemd守护运行