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/ ,如需转载,请注明出处,否则将追究法律责任。