Undo 相关的等待事件和已知问题 (Doc ID 1575701.1)
Undo Related Wait Events & Known Issues (Doc ID 1575701.1)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 9.2.0.8 to 11.2.0.4 [Release 9.2 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 24-Aug-2017***
PURPOSE
Below is the most commonly seen Undo related wait events. This document will help how to diagnose the troubleshoot the same
以下是最常见的与undo相关的等待事件。本文档将帮助您如何诊断相同的故障
- Enq: US Contention
- Buffer Busy waits on Undo
- Wait for a undo record
TROUBLESHOOTING STEPS
Enq: US Contention:
As the number of transactions increases so is their need for space but if there is little space free because most is still allocated to unexpired blocks the sessions first search for free space in offline undo segments. If there are many of Offline undo segments, the search for space can generate lots of hits on dc_rollback_segments, the latch and US(Undo Segment)enqueue. This can lead to high 'latch: row cache objects' contention which may be seen on DC_ROLLBACK_SEGMENTS together with high 'enq: US - contention'
随着事务数量的增加,它们对空间的需求也随之增加,但是如果由于几乎所有空间仍分配给未过期的块而没有多少可用空间,则会话会首先在脱机undo段中搜索可用空间。如果存在许多“脱机”undo段,则对空间的搜索可能会在dc_rollback_segments,latch and US(Undo Segment)排队上产生很多匹配。这可能会导致较高的 'latch: row cache objects' 争用,这可能在 DC_ROLLBACK_SEGMENTS 上看到,同时还会出现较高的 'enq: US - contention'
Performance of the database is affected when this wait event occurs. Row cache objects latch protects the dictionary cache. The first thing to figure out whether most of the contention was contributed by a particular row cache objects child latch:
发生此等待事件时,数据库的性能会受到影响。行缓存对象latch可保护字典缓存。首先要弄清楚大多数争用是否是由特定的行缓存对象子latch引起的:
Use the following queries or Check AWR Report: 使用以下查询或检查AWR报告:
* Use the below queries 使用以下查询
1) select SEGMENT_NAME,STATUS,TABLESPACE_NAME from dba_rollback_segs where status = 'OFFLINE';
2) select latch#, child#, sleeps from v$latch_children where name='row cache objects' and sleeps > 0 order by sleeps desc;
LATCH# CHILD# SLEEPS
-------- ---------- ----------
120 1 3531645
10 5 400
3)Query v$rowcache to find the confirm
SQL> select parameter, gets from v$rowcache order by gets desc;
PARAMETER GETS
-------------------------------- ----------
dc_rollback_segments 310995555
dc_tablespaces 76251831
dc_segments 3912096
Here it shows dc_rollback_segments with highest gets.
* From AWR Report 从AWR报告中
Check for Top 5 Wait events 检查前5个等待事件
High 'latch: row cache objects' contention on dc_rollback_segmentstogether with high 'enq: US - contention'
dc_rollback_segments上的高 'latch: row cache objects' 争用与高的 'enq: US - contention' 一起
Top 5 Timed Events Avg %Total ~~~~~~~~~~~~~~~~~~ wait Call Event Waits Time (s) (ms) Time Wait ------------------------------ ------------ ----------- ------ ------
----------
latch: row cache objects 2,057,004 490,074 238 43.8
Concurrency
enq: US - contention 1,548,328 370,460 239 33.1
Other
* Other Information to collect: 收集的其他信息
1) When the issue occurs, collect hang analyze dumps and system state dumps. $ sqlplus / as sysdba
SQL> oradebug setmypid
SQL> oradebug unlimit
SQL> oradebug hanganalyze 3
SQL> oradebug dump systemstate 266 Wait for 5 seconds, and then continue with: SQL> oradebug dump systemstate 266
SQL> exit Wait for 2 minutes, and then again: $ sqlplus / as sysdba
SQL> oradebug setmypid
SQL> oradebug unlimit
SQL> oradebug hanganalyze 3
SQL> oradebug dump systemstate 266 2) AWR and/or ASH report of 30 or 60 minutes interval. 3) Alert.log from last startup
Known Bugs
1) BUG:7291739- CONTENTION UNDER AUTO-TUNED UNDO RETENTION
Fixed in
10.2.0.4.4, 10.2.0.5.0, 11.2.0.1.0
When using autotuned undo retention the high latch contention on 'latch: row cache objects' on dc_rollback_segments together with high enqueue contention on 'enq: US - contention' can occur.
使用自动调整的undo保留时,可能会在dc_rollback_segments上的 'latch: row cache objects' 上发生较高的latch争用,而在 'enq: US - contention' 上发生较高的排队争用。
Refer: Contention Under Auto-Tuned Undo Retention (Doc ID 742035.1) for other workarounds
2) Unpublished Bug 14226599 -Increase dc_rollback_segs hash buckets to reduce 'latch: row cache objects' waits
This is NOT a bug, but enhancement which increases the number of hash buckets in the "dc_rollback_segments" rowcache.
Versions confirmed being affected is 10.2.0.5,11.1.0.7,11.2.0.2 and 11.2.0.3
3) Bug 13252635 : ESSC: HIGH ENQ: US - CONTENTION, LATCH: GES RESOURCE HASH LIST ON STRESS TEST
closed as duplicate of unpublished Bug 11690639
4) Unpublished Bug 6870994: CREATE / ONLINE OF UNDO SEGMENTS SLOWER IN 11.1.0.6 THAN IN 10.2.0.3. If the number of enqueue gets is high while onlining of undo segments then we may have hit this problem.
5) Bug 5387030 : AUTOMATIC TUNING OF UNDO_RETENTION CAUSING SPACE PROBLEMS
Refer: How to correct performance issues with enq: US - contention related to undo segments (Doc ID 1332738.1)
Buffer Busy Waits on Undo 缓冲区忙等待undo
Buffer Busy Waits: 缓冲区忙等待
This wait happens when a session wants to access a database block in the buffer cache but it cannot as the buffer is "busy". The two main cases where this can occur are:
当会话要访问缓冲区高速缓存中的数据库块但由于缓冲区 "busy" 而无法访问数据库块时,会发生这种等待。其中,这可能会发生两种主要情况是
a) Another session is reading the block into the buffer 另一个会话读取块到缓冲区
b) Another session holds the buffer in an incompatible mode to our request 另一个会话持有不兼容的模式我们的请求缓冲区
Buffer Busy Waits on Undo happens when we want to NEW the block but the block is currently being read by another session (most likely for undo).
缓冲区忙等待上undo发生时,我们希望新的块,但另一个会话当前正在读取该块(很可能是undo操作)
1)Review the section Segments by Buffer Busy Waits, and note the segments with the highest waits
1) 查看“按缓冲区繁忙等待时间划分的细分”部分,并注意等待时间最长的细分
2)Run
SELECT p1 "File", p2 "Block", p3 "Reason"
FROM v$session_wait
WHERE event='buffer busy waits';
3)Refer: How to Identify The Segment Associated with Buffer Busy Waits (Doc ID 413931.1)
If the block type is 'Undo Header' then solution would be to add more rollback segments
如果块类型为 'Undo Header' ,则解决方案是添加更多回滚段
Known bugs:
Bug 5439554 : BUFFER BUSY WAITS TIMEOUTS ON INSERT INTENSIVE WORKLOAD/POSSIBLE DEADLOCK
Happens when buffer busy wait" timeouts may be seen when running with automatic undo management and in memory undo.
在使用自动undo管理和内存undo运行时,可能会看到“buffer busy wait”超时发生。
Solutions: 解决方案
=======
First, it is very important to check UNDO space healthness and mis-configurations.
首先,检查UNDO空间的健康状况和配置错误非常重要
Check the following document and follow the described checks/steps :
检查以下文档,并按照描述的检查/步骤操作
Troubleshooting ORA-01555 - snapshot too old: rollback segment number "string" with name "string" too small (Doc ID 1580790.1)
Afterwards, apply one/both of the following solutions :
然后,应用以下一种/两种方法
1. Setting _ROLLBACK_SEGMENT_COUNT to a high number to keep undo segments online:
1.将_ROLLBACK_SEGMENT_COUNT设置为较高的数字,以使undo段保持在线
ALTER SYSTEM SET "_rollback_segment_count"=<n> scope=both;
2. Set the event 10511 which disables SMON from offlining the undo segments which avoids the contention for US enqueue.
2. 设置事件10511,该事件使SMON无法使undo段脱机,从而避免争用US排队
Setting of this event does not effect the regular shrink/space reclaims as it only disables SMON from offlining to avoid excessive onlines of undo segments.
设置此事件不会影响常规的收缩/空间回收,因为它仅使SMON无法脱机,以避免过多的undo段联机。
alter system set events '10511 trace name context forever, level 1';
LATCH: UNDO GLOBAL DATA
This latch serializes the access to the Undo (aka Rollback) segment information in the SGA.
此锁存器序列化对SGA中的“undo”(又名“回滚”)段信息的访问。
Every time a session wants to know about the state of the Undo Segments, it has to get this latch.
会话每次想知道“undo段”的状态时,都必须获取此闩锁。
Known Bugs/Issues:
"LATCH: UNDO GLOBAL DATA" In The Top Wait Events (Doc ID 1451536.1)
Bug 5751672 - "In memory undo latch" / "undo global data" latch contention from kturimugur (Doc ID 5751672.8)
Bug 7299191 - Contention on "undo global data" from concurrent Flashback queries (Doc ID 7299191.8)
Solutions:
To implement a solution for this problem, please execute any of the below alternative solutions:
要实现此问题的解决方案,请执行以下任一替代解决方案
- Increase the undo tablespace size to make more free space available in the undo tablespace 增加undo表空间的大小,以使undo表空间中有更多可用空间
OR
- Reduce the UNDO_RETENTION value, so less undo is being retained 减小UNDO_RETENTION值,以便保留较少的undo
OR
- Enable undo auto-tuning, by unsetting the_UNDO_AUTOTUNE instance parameter. 通过取消设置_UNDO_AUTOTUNE实例参数来启用undo自动调整
wait for a undo record 等待undo记录
You can disable parallel rollback by setting the following parameter
您可以通过设置以下参数来禁用并行回滚
fast_start_parallel_rollback = false
REFERENCES
NOTE:5751672.8 - Bug 5751672 - "In memory undo latch" / "undo global data" latch contention from kturimugur
NOTE:7299191.8 - Bug 7299191 - Contention on "undo global data" from concurrent Flashback queries
NOTE:1332738.1 - How to correct performance issues with enq: US - contention related to undo segments
NOTE:1451536.1 - "LATCH: UNDO GLOBAL DATA" In The Top Wait Events
Undo 相关的等待事件和已知问题 (Doc ID 1575701.1)的更多相关文章
- 与IO相关的等待事件troubleshooting-系列9
Buffer Cache与IO相关的等待事件: 这种等待事件的产生原因是包含DBWR进程和IO Slaves的Buffer Cache操作. 'db file parallel write' , 'd ...
- 与IO相关的等待事件troubleshooting-系列5
'db file scattered read' 这是另一种常见的等待事件.他产生于Oracle从磁盘读取多个块到Buffer Cache中非连续(" scattered&q ...
- latch - undo global data等待事件分析
一环境跑压力测试的时候,标题所述等待事件在top N中.不用查,也知道是因为undo竞争的事件. 根据metalink文档解释,是由于undo表空间不足引起的. This implies that s ...
- Oracle Tuning 基础概述01 - Oracle 常见等待事件
对Oracle数据库整体性能的优化,首先要关注的是在有性能问题时数据库排名前几位等待事件是哪些.Oracle等待事件众多,随着版本的升级,数量还在不断增加,可以通过v$event_name查到当前数据 ...
- 等待事件:enq: HW - contention和enq: TM - contention
今天生成了生产库前几日的AWR报告,发现等待事件中出现了一个陌生的event--enq: HW - contention,google一下是ASSM(Auto Segment Space Manage ...
- Oracle 等待事件 db file sequential read
db file sequential read-数据文件顺序读取 等待事件: "db file sequential read" Reference Note (文档 ID 345 ...
- oracle之 等待事件LOG FILE SYNC (awr)优化
log file sycn是ORACLE里最普遍的等待事件之一,一般log file sycn的等待时间都非常短 1-5ms,不会有什么问题,但是一旦出问题,往往都比较难解决.什么时候会产生log f ...
- 【等待事件】等待事件系列(3+4)--System IO(控制文件)+日志类等待
[等待事件]等待事件系列(3+4)--System IO(控制文件)+日志类等待 1 BLOG文档结构图 2 前言部分 2.1 导读和注意事项 各位技术爱好者,看完本文后,你可 ...
- Oracle等待事件之db file sequential read/ db file parallel read
1.产生原因 db file sequential read这个是非常常见的I/O 相关的等待事件.表示发生了与索引扫描相关的等待.意味着I/O 出现了问题,通常表示I/O竞争或者I/O 需求太多. ...
随机推荐
- 如果获取ruby的hash的v值?
最近写ruby,用到hash,通过k去获取v值,有时候通过hash["k"]去获取可以获取到,有时候通过又获取不到,感觉一脸懵逼 仔细观察了下ruby的hash,有两种表现形式,所 ...
- 避免网络爬虫IP被封的策略
背景 这两天一直在搞Java网络爬虫作为Java课程设计,目标是爬取豆瓣电影top250的影评,之后可能还需要进行情感分析,当然这就不是爬虫的内容了.我的爬虫程序在一开始只是一个页面一个页面的爬取信息 ...
- pillow模块Image.crop()函数切割图片方法,参数说明
使用Image.crop()方法对图片进行切割. 参数: Image.crop(left, up, right, below) left:与左边界的距离 up:与上边界的距离 right:还是与左边界 ...
- create connection SQLException, url: jdbc:mysql://localhost:3306/demo, errorCode 1045, state 28000
错误原因: 配置文件中 username 与 Mysql 关键字冲突 改为:
- 分析Android APK-反编译修改打包
2.2 这个章节的主要作用就是,修改一个别人的app,在里边增加一段自己的广告代码. 2.2.1 UAA 编译修改,工具安装配置之前讲过,无需再赘述.我们找到了一款游戏app的apk, 找到所在的ap ...
- Python 函数和类
python作为一个面向对象的语言,也有类似java等面向对象语言相同的数据结构(class)的定义,和代码块数据结构定义"函数".为了极大可能的简化代码调用逻辑和书写规则,pyt ...
- 百度大脑UNIT3.0详解之语音语义一体化方案
在电话客服场景里,用户和机器人交流的过程中,经常会出现沉默.打断机器人.噪声等情况,机器人在应对这些异常情况的时候,需要语音和语义理解技术进行处理,才能实现用户和机器人的流畅交谈.而这些能力的获取与应 ...
- Angular框架入门
今天简单学习了AngularJS框架,在这里我想简单的总结一下我所了解的AngularJS和一些入门案例! 首先,我们要知道什么是AngularJS? AngularJS 诞生于2009年,由Mis ...
- Python语法速查: 13. 操作系统服务
返回目录 本篇索引 (1)sys模块 (2)os模块 (3)与Windows相关模块 (4)subprocess模块 (5)signal模块 (1)sys模块 sys模块用于Python解释器及其环境 ...
- 淘宝爬取图片和url
刚开始爬取了 百度图片和搜狗图片 但是图片不是很多,随后继续爬取淘宝图片,但是淘宝反爬比较厉害 之前的方法不能用 记录可行的 淘宝爬取 利用selenium爬取 https://cloud.tence ...