Oracle数据库大量library cache: mutex X及latch: shared pool问题排查一例
业务系统数据库夯住,数据库内大量的library cache: mutex X及latch: shared pool等待,alert日志信息如下
Tue Sep ::
WARNING: inbound connection timed out (ORA-)
Tue Sep ::
WARNING: inbound connection timed out (ORA-)
Tue Sep ::
WARNING: inbound connection timed out (ORA-)
Tue Sep ::
WARNING: inbound connection timed out (ORA-)
数据库历史session统计如下
latch: shared pool
library cache: mutex X
library cache: mutex X
6hurnha5k9qb6 latch: shared pool
latch: shared pool
0rs4yunhszr7w latch: shared pool
b7fy2a0snpja9 library cache: mutex X
null event
latch: shared pool
0rs4yunhszr7w latch: shared pool
library cache: mutex X
6hurnha5k9qb6 latch: shared pool
b7fy2a0snpja9 library cache: mutex X
latch: shared pool
library cache: mutex X
null event
latch: shared pool
latch: shared pool
0rs4yunhszr7w latch: shared pool
b7fy2a0snpja9 library cache: mutex X
6hurnha5k9qb6 latch: shared pool
library cache: mutex X
library cache: mutex X
阻塞会话明细
SQL> select event,sql_id,USER_ID,program from gV$active_session_history a where INST_ID= and SESSION_ID= and to_char(a.sample_time, 'yyyymmddHH24mi')=;
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002)
latch: shared pool 6hurnha5k9qb6 oracle@ZJHZ-px-xxx- (J002) SQL> select event,sql_id,USER_ID,program from gV$active_session_history a where INST_ID= and SESSION_ID=352and to_char(a.sample_time, 'yyyymmddHH24mi')=;
EVENT SQL_ID USER_ID PROGRAM
------------------------------ ------------- ---------- ------------------------------------------------
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
oracle@ZJHZ-px-xxx- (MMAN)
MMAN进程是Oracle 10g引入用于进行内存管理的进程,在进行动态内存调整时,这个进程要发挥其作用,这个进程的作用是内部数据库任务的执行者:MMAN is used for internal database tasks.
MMAN to wait and post itself for satisfying an auto-tuned memory request while trying to fully free a component's quiesced granules. In Release 10.1, the name of this event was 'wait for SGA component shrink'.
在后台转储跟踪,可以看到MMAN进程的等待:
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=
WAIT #: nam='SGA: MMAN sleep for component shrink' ela= component id= current size= target size= obj#=- tim=
查询数据库最近内存调整记录
SQL> select COMPONENT,
2 STATUS,
3 OPER_TYPE,
4 OPER_MODE,
5 PARAMETER,
6 round(INITIAL_SIZE/1024/1024,2) INITIAL_mb ,
7 round(TARGET_SIZE/1024/1024,2) TARGET_MB,
8 round(FINAL_SIZE/1024/1024,2) FINAL_mb,
9 to_char(START_TIME, 'yyyy-mm-dd hh24:mi:ss') START_TIME,
10 to_char(END_TIME, 'yyyy-mm-dd hh24:mi:ss') END_TIME
11 from V$MEMORY_RESIZE_OPS
12 where START_TIME > to_date('','yyyymmddhh24')
13 order by END_TIME;
COMPONENT STATUS OPER_TYPE OPER_MODE PARAMETER INITIAL_MB TARGET_MB FINAL_MB START_TIME END_TIME
------------------------------ --------- ------------- --------- ------------------------------ ---------- ---------- ---------- ------------------- -------------------
shared pool COMPLETE SHRINK DEFERRED shared_pool_size 2752 2624 2624 2017-09-26 22:01:21 2017-09-26 22:10:07
DEFAULT buffer cache COMPLETE GROW DEFERRED db_cache_size 1536 1664 1664 2017-09-26 22:01:21 2017-09-26 22:10:07
DEFAULT buffer cache COMPLETE SHRINK DEFERRED db_cache_size 1664 1536 1536 2017-09-26 22:23:11 2017-09-26 22:23:13
shared pool COMPLETE GROW DEFERRED shared_pool_size 2624 2752 2752 2017-09-26 22:23:11 2017-09-26 22:23:13
至此问题定位,是由于SGA内存自动调整导致数据库异常
Oracle数据库大量library cache: mutex X及latch: shared pool问题排查一例的更多相关文章
- library cache: mutex X
我们先来看看 library cache: mutex X . 是个什么东西 The library cache mutex is acquired for similar purposes that ...
- Troubleshooting 'library cache: mutex X' Waits. (Doc ID 1357946.1)
In this Document Purpose Troubleshooting Steps What is a 'library cache: mutex X' wait? What ...
- [20190402]Library Cache mutex.txt
[20190402]Library Cache mutex.txt 1.环境:SCOTT@book> @ ver1PORT_STRING VERSION ...
- 11g等待事件之library cache: mutex X
11g等待事件之library cache: mutex X 作者: dbafree 日期: 2012 年 07 月 01 日发表评论 (0)查看评论 library cache: mutex X ...
- Troubleshooting 'library cache: mutex X' Waits.
What is a 'library cache: mutex X' wait? The mutex feature is a mechanism to control access to in me ...
- Oracle数据库学习笔记(一)
Oracle的体系结构大体上分为两部分:Instance(实例)和Database(数据库). Instance(实例) :在Oracle Instance中主要包含了SGA以及一些进程(例如:P ...
- Oracle Shared Pool 原理
Oracle Shared Pool 原理 由于shared pool中最重要的是library cache,所以本文主要讲解Library cache的结构,library cache latch, ...
- Oracle内存详解之 Library cache 库缓冲
Oracle内存详解之 Library cache 库缓冲 2017年11月09日 11:38:39 阅读数:410更多 个人分类: 体系结构 Library cache是Shared pool的一部 ...
- Oracle内存详解之二 Library cache 库缓冲-转载
Library cache是Shared pool的一部分,它几乎是Oracle内存结构中最复杂的一部分,主要存放shared curosr(SQL)和PLSQL对象(function,procedu ...
随机推荐
- C#动态方法调用 提高程序的扩展性
此篇将介绍C#如何在运行时动态调用方法.当某些类型是运行时动态确定时,编译时的静态编码是无法解决这些动态对象或类的方法调用的.此篇则给你一把利剑,让动态对象的方法调用成为可能. 1.动态调用dll里的 ...
- 插入排序——Java实现
一.排序思想 从数组第一个元素开始(0下标),该元素可以认为已经被排序: 取出待排序列中第一个元素,然后从“有序”序列中,从后往前扫描: 如果该元素(有序序列)大于待插入元素(待排序列),将该元素后移 ...
- Java ConcurrentHashMap初始化
初始化ConcurrentHashMap时可以指定map大小,由于ConcurrentHashMap代码默认大小是2n,这里需要把用户填的大小转换成2n备注:代码基于jdk 1.8.0_91Concu ...
- 自己动手实现STL 01:内存配置器的实现(stl_alloc.h)
一.前言 在STL中,容器是其中的重中之重,基本的STL中的算法,仿函数等都是围绕着容器实现的功能.而,内存配置器,是容器的实现的基础.所以,我第一次要去编写便是内存配置器的实现.在STL中,内存配置 ...
- H5左滑删除JS插件
<script type="text/javascript"> /** * zepto插件:向左滑动删除动效 * 使用方法:$('.itemWipe').touchWi ...
- flex布局帮助你快速实现布局
flex布局可以帮我们快速布局一些区块,实现你想要的效果,不用再去float,position之类的.我们在布局网页的时候很多时候都是一些特殊布局,flex就能帮我快速去布局,不需要去定位. 任何一个 ...
- Java实现队列结构的详细代码
一.什么是队列结构 一种线性结构,具有特殊的运算法则[只能在一端(队头)删除,在另一端(队尾)插入]. 分类: 顺序队列结构 链式队列结构 基本操作: 入队列 出队列 二.准备数据 static fi ...
- python里面的encode和decode函数
转自 http://www.cnblogs.com/evening/archive/2012/04/19/2457440.html 总结一句话 encode: 字符串打算输出(给别人用)比如pr ...
- jboss安全配置规范
https://wenku.baidu.com/view/aad157a4f242336c1fb95ed5.html https://wenku.baidu.com/view/ac227281ec3a ...
- Orchard Core 文档翻译 (四)CMS ModulesTitle (OrchardCore.Title)
Title (OrchardCore.Title) 标题模块提供Title Part ,允许用户定义内容项的标题.它还定义了ContentItemMetadata方面的DisplayText属性 Th ...