log file sync等待事件

log file sync 官方文档解释:
When a user session commits (or rolls back), the session's redo information must be flushed to the redo logfile by LGWR. The server process performing the COMMIT  or ROLLBACK  waits under this event for the write to the redo log to complete.
当一个用户会话提交或回滚之后,此会话的redo信息必须被LGWR进程从内存写到redo日志文件中。这个服务进程在此事件写入redo日志完成后执行commit或者rollback。
接下来给出了两种情况和解决方案:
如果avg time低,并且等待次数多,就说明有可能应用程序的dml操作后的commit或者rollback频繁,比如一次insert,一次commit,这种情况就可以采用批量提交的方式来降低此等待。
如果avg time高,就要看它在做什么上花费了大量此等待,如果是因为io的原因,那么:
  • Reduce other I/O activity on the disks containing the redo logs, or use dedicated disks.

  • Alternate redo logs on different disks to minimize the effect of the archiver on the log writer.

  • Move the redo logs to faster disks or a faster I/O subsystem (for example, switch from RAID 5 to RAID 1).

  • Consider using raw devices (or simulated raw devices provided by disk vendors) to speed up the writes.

  • Depending on the type of application, it might be possible to batch COMMITs by committing every N rows, rather than every row, so that fewer log file syncs are needed.


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

转载于:http://blog.itpub.net/25915379/viewspace-734608/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值