ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 等待事件 log file sync 小解

等待事件 log file sync 小解

原创 Linux操作系统 作者:sxitsxit 时间:2012-11-08 16:46:06 0 删除 编辑
1:在网上找了这么一段话,关于 log file sync的解释

The Oracle "log file sync" wait event is triggered when a user session issues a

commit (or a rollback). The user session will signal or post the LGWR to write

the log buffer to the redo log file. When the LGWR has finished writing, it  will

post the user session. The wait is entirely dependent on LGWR to write out the

necessary redo  blocks and send  confirmation of its completion back to the user

session. The wait time includes the writing of the  log buffer and the post, and is

sometimes called "commit latency".


大概的中文解释是 :

当用户进程发出commit或rollback命令时,会触发lgwr进程将 log buffer中的日志写

出到日志文件中。当lgwr进程将log buffer中的内容完全写出到日志文件以后,它会

通知用户进程已经搞定 !也就是我们常看到的 commit complete 或

rollback  complete 。  在次等待事件中,它包括了 lgwr进程写出log buffer中内容到

日志文件的时间,以及lgwr完成写出内容后,给用户进程的反馈时间。



2:在eygle的书中,也找到了一些关于log file sync等待事件的解决方法

第一点: 提高lgwr进程的性能,尽量使用快速磁盘,不要把redo log file 放在raid5

磁盘上。 因此 raid5 的写性能很低

第二点:使用批量的提交,避免程序中单个commit操作




http://www.confio.com/db-resources/oracle-wait-events/log-file-sync/





来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24862808/viewspace-748728/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: hadoop 小记1
请登录后发表评论 登录
全部评论

注册时间:2011-04-14

  • 博文量
    98
  • 访问量
    323764