[20201204]关于等待事件Log File Sync.txt --//昨天被别人问及Log File Sync等待事件,实际上我以前的理解存在很大的误区,我一直认为出现这个主要是写日志太慢,磁盘处理 --//IO能力太差造成的,再还有就是频繁提交。实际上还忽略一种情况,就是CPU太忙,这样的情况我很少遇到。 --//找到一个链接: https://logicalread.com/oracle-log-file-sync-wait-event-dr01/ 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". The "log file sync" wait event may be broken down into the following components: 1. Wakeup LGWR if idle 2. LGWR gathers the redo to be written and issues the I/O 3. Wait time for the log write I/O to complete 4. LGWR I/O post processing 5. LGWR posting the foreground/user session that the write has completed 6. Foreground/user session wakeup Tune the system based on the "log file sync" component with the most wait time. Steps 2 and 3 are accumulated in the "redo write time" statistic. (i.e. as found under STATISICS section of Statspack) Step 3 is the "log file parallel write" wait event. (See Metalink Note 34583.1:"log file parallel write") Steps 5 and 6 may become very significant as the system load increases. This is because even after the foreground has been posted it may take some time for the OS to schedule it to run. 根据"日志文件同步"组件调整系统,等待时间最多。 步骤2和步骤3是在"重做写入时间"统计中累积的。 (即。 如Statspack的STATISICS 部分所示)步骤3是"日志文件并行写入"等待事件。 (参见Metalink注释34583.1:"日志文件并行写入")步骤5和步骤6可能随着系统负载的 增加而变得非常重要。 这是因为即使在前台发布之后,操作系统也可能需要一些时间来安排它的运行。 --//看看我们几个生产系统的情况: > @ tpt/ash/ash_wait_chains event2 "event='log file sync'" trunc(sysdate-1) trunc(sysdate) -- Display ASH Wait Chain Signatures script v0.2 BETA by Tanel Poder ( http://blog.tanelpoder.com ) %This SECONDS AAS WAIT_CHAIN ------ ---------- ------- -------------------------------------------- 98% 1043 .0 -> log file sync -> log file parallel write 1% 15 .0 -> log file sync 0% 5 .0 -> log file sync -> ON CPU --//很明显这个问题集中在log file parallel write,也就是写入磁盘太慢。 --//这套系统磁盘设置有问题,设置在写通模式。导致这样的情况出现。参考链接 --// http://blog.itpub.net/267265/viewspace-2684072/ > @ tpt/ash/ash_wait_chains event2 "event='log file sync'" trunc(sysdate-1) trunc(sysdate) -- Display ASH Wait Chain Signatures script v0.2 BETA by Tanel Poder ( http://blog.tanelpoder.com ) %This SECONDS AAS WAIT_CHAIN ------ ---------- ---------- -------------------------------------------- 87% 104 0 -> log file sync 7% 8 0 -> log file sync -> log file parallel write 7% 8 0 -> log file sync -> ON CPU --//这个磁盘情况很少,但是业务高峰时密集提交很多。 --//这套系统平时业务很少,但是业务出现非常集中。 --//再看看生产系统exadata的情况,不再解析: > @ tpt/ash/ash_wait_chains event2 "event='log file sync'" trunc(sysdate-1) trunc(sysdate) -- Display ASH Wait Chain Signatures script v0.2 BETA by Tanel Poder ( http://blog.tanelpoder.com ) %This SECONDS AAS WAIT_CHAIN ------ ---------- ---------- -------------------------------------------- 75% 354 0 -> log file sync 21% 100 0 -> log file sync -> log file parallel write 3% 16 0 -> log file sync -> ON CPU
[20201204]关于等待事件Log File Sync.txt
来源:这里教程网
时间:2026-03-03 16:17:13
作者:
编辑推荐:
- [20201204]关于等待事件Log File Sync.txt03-03
- [20201203]为什么不使用索引.txt03-03
- 恒行2招商主管[7288481]关于等待事件Log File Sync.txt03-03
- 记录一次惊心动魄的误操作(Oracle)03-03
- [20201207]12c v$open_cursor视图.txt03-03
- [20201207]关于ORACLE IMU的一些疑问.txt03-03
- oracle 修改数据文件路径(四种方式)03-03
- Reliable Key Holder for Chastity Sub Anywhere in the World03-03
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- oracle删除表中数据(delete与truncate)
oracle删除表中数据(delete与truncate)
26-03-03 - SQL Server数据库mdf文件中了勒索病毒*.mdf.[helpbackup@email.tg].Devos
- G006-ORACLE-INS-SIFS-01 ORACLE 19C SIFS Ins ON RHEL 8.2
- G008-ORACLE-DG ORACLE 19C Active Data Guard DML Redirection
- 查看oracle数据库中,哪些表的字段是null值比较多
查看oracle数据库中,哪些表的字段是null值比较多
26-03-03 - Oracle数据库服务器dbf文件中了勒索病毒,扩展名被篡改为.CC7H
Oracle数据库服务器dbf文件中了勒索病毒,扩展名被篡改为.CC7H
26-03-03 - 数据库范式
数据库范式
26-03-03 - 沙龙回顾丨开发者掌握这些背后的技术路径,可助力企业智能化升级
沙龙回顾丨开发者掌握这些背后的技术路径,可助力企业智能化升级
26-03-03 - Oracle的awr报告分析
Oracle的awr报告分析
26-03-03 - DDD 在京东 DevOps 项目协作领域的落地实战
DDD 在京东 DevOps 项目协作领域的落地实战
26-03-03
