Troubleshooting many session waiting ‘latch free'(transaction branch allocation) 11gR2

栏目: 数据库 · 发布时间: 7年前

内容简介:前日有套11.2.0.3 RAC on HPUX数据库环境突然出现较高的latch: free wait event, 该event在10G以后的版本较为少见(已经细化为具体latch) ,  通过p1 or p2值可以确认具体latch. 下面记录一下这个问题。Note:具体的latch是“transaction branch allocation” 常见于多个新会话logon开始新trasactions时。

前日有套11.2.0.3 RAC on HPUX数据库环境突然出现较高的latch: free wait event, 该event在10G以后的版本较为少见(已经细化为具体latch) ,  通过p1 or p2值可以确认具体latch. 下面记录一下这个问题。

SQL> @snapper ash 5 1 all
Sampling SID all with interval 5 seconds, taking 1 snapshots...

-- Session Snapper v4.22 - by Tanel Poder ( http://blog.tanelpoder.com/snapper ) - Enjoy the Most Advanced Oracle Troubleshooting Script on the Planet! :)


---------------------------------------------------------------------------------------------------------------
  ActSes   %Thread | INST | SQL_ID          | SQL_CHILD | EVENT                               | WAIT_CLASS
---------------------------------------------------------------------------------------------------------------
  191.25  (19125%) |    1 |                 |           | latch free                          | Other
    9.50    (950%) |    1 | bnqupvb8r8cgz   | 0         | ON CPU                              | ON CPU
    8.50    (850%) |    1 | 26838x2c8b9f0   | 0         | ON CPU                              | ON CPU
    6.25    (625%) |    1 |                 |           | log file sync                       | Commit
    4.00    (400%) |    1 | b0q3p47z445s7   | 1         | ON CPU                              | ON CPU
    3.75    (375%) |    1 |                 |           | ON CPU                              | ON CPU
    3.00    (300%) |    1 | 22bp4wvbzarpz   | 0         | ON CPU                              | ON CPU
    3.00    (300%) |    1 | 8uj2h75038h0n   | 1         | read by other session               | User I/O
    2.75    (275%) |    1 | bqkx2vdyd65pq   | 0         | read by other session               | User I/O
    2.75    (275%) |    1 | f22guq9nw55x4   | 2         | db file scattered read              | User I/O

--  End of ASH snap 1, end=2018-11-28 14:55:28, seconds=5, samples_taken=4, AAS=369.8

SQL> @sw "select sid from v$session where event='latch free'"

    SID STATE   EVENT                                          SEQ# SEC_IN_WAIT P1                  P2                  P3                  P1TRANSL
------- ------- ---------------------------------------- ---------- ----------- ------------------- ------------------- ------------------- ------------------------------------------
      3 WAITING latch free                                    50634           0 address=            number= 244         tries= 0            0xC0000000AFE0BE98: transaction branch all
                                                                                0xC0000000AFE0BE98                                          ocation[par

      7 WAITING latch free                                    26288           0 address=            number= 244         tries= 0            0xC0000000AFE0BE98: transaction branch all
                                                                                0xC0000000AFE0BE98                                          ocation[par

     93 WAITING latch free                                    28532           0 address=            number= 244         tries= 0            0xC0000000AFE0BE98: transaction branch all
                                                                                0xC0000000AFE0BE98                                          ocation[par
...

SQL> select * from v$latchname where latch#=244;

    LATCH# NAME                                                                   HASH
---------- ---------------------------------------------------------------- ----------
       244 transaction branch allocation                                     397209581

-- or query v$latch_parent  using P1 value

Note:

具体的latch是“transaction branch allocation” 常见于多个新会话logon开始新trasactions时。

Troubleshooting many session waiting ‘latch free'(transaction branch allocation) 11gR2

收集该时段AWR

Troubleshooting many session waiting ‘latch free'(transaction branch allocation) 11gR2 Troubleshooting many session waiting ‘latch free'(transaction branch allocation) 11gR2 Troubleshooting many session waiting ‘latch free'(transaction branch allocation) 11gR2

Note:

注意latch free, transaction branch allocation占用较高的db time, latch 位置主要是ksupuc(kernel service user processes push user call), 和ktcsbr(kernel transaction control component state branch), 同时每秒logon在10, 每秒事务在860左右, 是一个较忙的数据库, 同时CPU 使用率高大98%。 是否在是CPU 较高时触发了某个BUG? 在MOS中查找发现命中一 Bug 20130575 .

该BUG在影响11.2.0.3 、11.2.0.4 、12cR1 ,在12c R2版本中修复,在一些版本中提供one off patch, 但是在当前平台版本没有相应的bug. 因版本已过服务期,无法提供新的BUG. 该问题会在经过一段时间后自愈,还会间隔出现, 属于一种程序代码缺陷,没有其它有效的手段, 我分析该bug 应该于cpu high usage 有间接关系,于时建议部分应用调整到了另一节点, 规避该问题,调整后CPU降到70%左右后,该问题没有再出现。


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

新物种爆炸

新物种爆炸

吴声 / 中信出版社 / 2017-7-30 / 58.00元

宝马为什么要重点发展共享汽车 Airbnb正试图成为内容和社交平台 不排队、不结账、没有收银员的颠覆传统超市 茑屋书店要打造全新生活方式 基于新的商业环境与技术条件的变化,必须会产生新的品类和商业模式,这就是新物种! 大数据与人工智能等技术正在创建新的商业话语体系,创建新的权力架构,引领第四新物种爆炸。商业规则正在快速发生变化,新的模式与业态层出不穷。 要么成为......一起来看看 《新物种爆炸》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码