log file sync and log file parallel wait event
来源:互联网 发布:ucb2算法 编辑:程序博客网 时间:2024/05/21 18:12
log filesync:
Question: I have "log file sync waits" in my top-5 timedevents.
Answer: The log file sync wait occurs at theend of a transaction and the database writer (DBWR) must wait forthe log file sync.
"Before writing a batch of database blocks, DBWn finds the highesthigh redo block address that needs to be synced before the batchcan be written. DBWn then takes the redo allocation latch to ensurethat the required redo block address has already been written byLGWR, and if not, it posts LGWR and sleeps on a log file syncwait."
log file syncmetalink上解释:
"log file sync" Reference Note
When a user session(foreground process) COMMITs (or rolls back),the session's redo information needs to be flushed to the redologfile. The user session will post the LGWR to write all redorequired from the log buffer to the redo log file. When the LGWRhas finished it will post the user session. The user session waits on this wait event while waitingfor LGWR to post it back to confirm all redo changes are safely ondisk.
This may be described further as the time usersession/foreground process spends waiting for redo to be flushed tomake the commit durable. Therefore, we may think of these waits ascommit latency from the foreground process (or commit clientgenerally).
See Reducing Waits section below for more detailed breakdown ofthis wait event.
再来看看eygle写的log file sync等待事件:
当一个用户提交(commits)或者回滚(rollback),session的redo信息需要写出到redologfile中.
用户进程将通知LGWR执行写出操作,LGWR完成任务以后会通知用户进程.
这个等待事件就是指用户进程等待LGWR的写完成通知.
对于回滚操作,该事件记录从用户发出rollback命令到回滚完成的时间.
如果该等待过多,可能说明LGWR的写出效率低下,或者系统提交过于频繁.
针对该问题,可以关注:
log file parallel write等待事件
user commits,user rollback等统计信息可以用于观察提交或回滚次数
解决方案:
1.提高LGWR性能
尽量使用快速磁盘,不要把redo log file存放在raid 5的磁盘上
2.使用批量提交
3.适当使用NOLOGGING/UNRECOVERABLE等选项
可以通过如下公式计算平均redo写大小:
avg.redo write size = (Redo block written/redowrites)*512 bytes
如果系统产生redo很多,而每次写的较少,一般说明LGWR被过于频繁的激活了.
可能导致过多的redo相关latch的竞争,而且Oracle可能无法有效的使用piggyback的功能.
Log file parallel writeasktom上的解释:
Log file parallel write is writingredo records to the redo log files from the logbuffer.
Parameters:
P2 blocks will be written to each log member, in P3 number of
requests. i.e. If there were 2 requests, there would be two
physical writes per log member. The no. of log blocks will be
divided up between the requests.
IO done, this event is used by the IO slave processes (oracleInnn)when waiting for slave
IO processes to complete a request
This wait event is used in both IDLE and NON-IDLE conditions
so can be very misleading.
- log file sync and log file parallel wait event
- log file parallel write wait event(摘自sharklove)
- oracle event ----- Log file sync
- log file switch and log file sync
- log file sync和log file parallel write的关系
- log file sync 与 log file parallel write 等待事件
- Oracle wait event --- log file switch
- log file parallel write
- log file parallel write
- log file sync
- log file sync
- 漫谈LOG FILE SYNC
- log file sync
- log file sync
- LOG FILE SYNC概述
- log file sync总结
- log file sync
- 漫谈LOG FILE SYNC
- 5天学会jaxws-webservice编程第四天
- 实习记录之http断点上传
- 弄完了服务器发布工具
- 资深投资人教你十步赢得投资者青睐
- JAD
- log file sync and log file parallel wait event
- c#拼接字符串
- dede友情链接
- 测试网站访问速度的5个方法
- 5天学会jaxws-webservice编程第五天
- httpclient 网页抓取 几个问题
- iOS开发之UIWebView与JavaScript的交互
- 高版本sql server迁移到低版本Sql Server
- php apache mysql的优化