redo的等待log file sync和log file parallel write和redo size设置

今早上pub,看到pub的一篇帖子中提到了如何设置redo log的大小,利用视图v$log_history可以查看redo的切换的具体信息来判断。

Select roundfirst_time,’DD’,thead#,count(sequence#) from v$Log_history

group round(first_time,’DD’),thread#

order by 1,2

主要是通过每天的日志切换量来判断。

select a.recid,a.first_time,b.first_time last_time,(b.first_time-a.first_time)*24 redo_replace

from v$log_history a,v$log_history b

where a.recid=b.recid-1

order by a.first_time desc

这个sql可以查出两个日志切换时间间隔,单位时间间隔为小时,然后还可以参考alter trace等。在设计阶段真的要好好考虑!

联想到跟redo相关的两个等待事件:log file parallel writelog file sync

Log file parallel write

log bufferretriesredo log文件,当达到阀值还没有完成会出现此等待事件。

log file sync

当用户commit或者rollback时,此时会触发lgwrredo retries写入redo log,而用户进程将通知lgwr写出操作,lgwr完成任务以后会通知用户进程,此时达到阀值时就会出现log file sync,这个等待事件是用于进程等待lgwr完成的通知。如果log file parallel writelog file sync出现频率相同,很有可能log file sync在等待log file parallel write的完成,此时可以判断磁盘的I/O存在瓶颈。

1 提高lgwr性能,主要从硬件着手。

2 批量提交

以下计算方法和分析摘自eygleblog中计算平均redo写大小

avg.redo write size = (Redo block written/redo writes)*512 bytes

如果此数据偏小,系统的提交过于频繁,而过渡频繁的redo writinglatch竞争.

[@more@]

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

转载于:http://blog.itpub.net/25362835/viewspace-1056244/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值