笔记:Memory Notification: Library Cache Object loaded into SGA

在警告日志中发现一些这样的警告信息:

Mon Nov 21 14:24:22 2011
Memory Notification: Library Cache Object loaded into SGA
Heap size 5800K exceeds notification threshold (2048K)
Details in trace file c:\oracle\product\10.2.0\admin\hy2003\udump\hy2003_ora_4372.trc
KGL object name :PCDM.BIN$C8iYfZ9TS8ORv9KUD+hrSA==$0

在网上查到:

【问题处理】Memory Notification: Library Cache Object loaded into SGA
1.问题现象
数据库日常巡检过程中,在alert日志中发现如下警告信息
……省略……
Thu Apr 15 22:06:31 2010
Memory Notification: Library Cache Object loaded into SGA
Heap size 3215K exceeds notification threshold (2048K)
KGL object name :SELECT TOWNER, TNAME, NAME, LENGTH, PRECISION, SCALE, TYPE, ISNULL,             CONNAME, COLID, INTCOLID, SEGCOLID, COMMENT$, DEFAULT$, DFLTLEN,             ENABLED, DEFER, FLAGS, COLPROP, ADTNAME, ADTOWNER, CHARSETID,             CHARSETFORM, FSPRECISION, LFPRECISION, CHARLEN, TFLAGS, TYPESYN,             COLCLASS      FROM   SYS.EXU10COE      WHERE  TOBJID = :1      ORDER  BY COLCLASS
Thu Apr 15 22:06:55 2010
Memory Notification: Library Cache Object loaded into SGA
Heap size 5118K exceeds notification threshold (2048K)
Details in trace file /home/oracle/oracle/product/10.2.0/db_1/admin/orcl/udump/orcl_ora_18031.trc
KGL object name :SELECT SYS_XMLGEN(VALUE(KU$), XMLFORMAT.createFormat2(‘TABLE_T‘, ‘7‘)), KU$.OBJ_NUM FROM SYS.KU$_FHTABLE_VIEW KU$ WHERE NOT (BITAND (KU$.PROPERTY,8192)=8192) AND  NOT BITAND(KU$.SCHEMA_OBJ.FLAGS,128)!=0 AND  KU$.SCHEMA_OBJ.NAME=:NAME1 AND  KU$.SCHEMA_OBJ.OWNER_NAME=:SCHEMA2
Fri Apr 16 05:00:07 2010
……省略……

2.问题原因
在Oracle 10.2.0.1版本数据库中隐含参数_kgl_large_heap_warning_threshold默认值是2M,该参数控制加载到内存中对象的大小,当加载的对象大于2M时,就会在alert警告文件中进行提示。2M的默认大小相对太小,因此在10.2.0.1版本中可能很容易遇到这个报错信息。该参数默认值在10.2.0.2版本中进行了调整,调整到了50M。

1)确认出现警告的数据库的版本是10.2.0.1
[email protected]> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

2)确认隐含参数_kgl_large_heap_warning_threshold的默认大小
[email protected]> select a.ksppinm name,b.ksppstvl value,a.ksppdesc description
  2    from x$ksppi a,x$ksppcv b
  3   where a.indx = b.indx
  4     and a.ksppinm = ‘_kgl_large_heap_warning_threshold‘
  5  /

NAME                              VALUE    DESCRIPTION
--------------------------------- -------- --------------------------------------------------------------
_kgl_large_heap_warning_threshold  2097152  maximum heap size before KGL writes warnings to the alert log

[email protected]> select 2097152/1024/1024 MB from dual;

MB
----------
         2

3.问题处理方法
既然知道了问题原因,处理起来就很简单了。如果不希望在alert文件中看到这些报错,可以适当调大隐含参数“_kgl_large_heap_warning_threshold”的值,或将其设置为“0”。
1)将_kgl_large_heap_warning_threshold参数大小调整为50M
[email protected]> alter system set "_kgl_large_heap_warning_threshold"=52428800 scope=spfile;

System altered.

2)重启数据库

OK,该问题到此已得到有效处理。

select a.ksppinm name,b.ksppstvl value,a.ksppdesc description
from x$ksppi a,x$ksppcv b
where a.indx = b.indx
and a.ksppinm = ‘_kgl_large_heap_warning_threshold‘;

NAME                                                                             VALUE                      DESCRIPTION
----------------------- ------------------------------ -------------------------------
_kgl_large_heap_warning_threshold       2097152       maximum heap size before KGL writes warnings to the alert log

按介绍修改参数:
System altered alter system set ‘_kgl_large_heap_warning_threshold‘=8388608 scope=spfile ;

重启数据库。

NOTE:

The default threshold in 10.2.0.1 is 2M.

So these messages could show up frequently in some application environments.

In 10.2.0.2,  the threshold was increased to 50MB after regression tests, so this should be a reasonable and recommended value.   If you continue to see the these warning messages in the alert log after applying 10.2.0.2 or higher, an SR may be in order to investigate if you are encountering a bug in the Shared Pool.

时间: 2024-10-11 22:42:43

笔记:Memory Notification: Library Cache Object loaded into SGA的相关文章

Memory Notification: Library Cache Object loaded into SGA

问题现象: 数据库服务器可以ping通,但SSH连接不了:应用.plsqldeveloper 也都连接不了.事情到了这个地步,只能重启服务器. 服务器环境:oracle10.2.0.1 +rhel5.8 重启后,查看实例日志: Wed Apr 30 13:12:24 2014Memory Notification: Library Cache Object loaded into SGAHeap size 2210K exceeds notification threshold (2048K)K

Library cache lock/pin详解

Library cache lock/pin 一.概述 ---本文是网络资料加metalink 等整理得来一个实例中的library cache包括了不同类型对象的描述,如:游标,索引,表,视图,过程,等等. 这些对象不能在他们被使用的时候改变,他们在被使用的时候会被一种library locks and pins的机制锁住. 一个会话中,需要使用一个对象,会在该对象上先得到一个library lock(null, shared or exclusive模式的)这是为了,防止其他会话也访问这个对

Oracle内存详解之二 Library cache 库缓冲-转载

Library cache是Shared pool的一部分,它几乎是Oracle内存结构中最复杂的一部分,主要存放shared curosr(SQL)和PLSQL对象(function,procedure,trigger)的信息,以及这些对象所依赖的table,index,view等对象的信息. Library cache需要解决三个问题: 1.快速定位的问题:Library cache中对象众多,Oracle如何管理这些对象,以便服务进程可以迅速找到他们需要的信息.比如某个服务进程需要迅速定位

遇到Library cache load lock 等待事件

遇到Library cache load lock 等待事件: 在Troubleshooting Library Cache: Lock, Pin and Load Lock (Doc ID 444560.1)这篇文章中,详细解释了该等待事件: If an object is not in memory, then a library cache lock cannot be acquired on it. The object has to be loaded into the memory

WAITEVENT: "library cache: mutex X" (文档 ID 727400.1)

WAITEVENT: "library cache: mutex X" (文档 ID 727400.1) 2014-01-19 09:56 2367人阅读 评论(0) 收藏 举报  分类: 网络资源_ORACLE_调优(108)  目录(?)[-] APPLIES TO PURPOSE SCOPE DETAILS Definition Individual Waits Systemwide Waits Wait Time Reducing Waits Wait times Known

共享内存(Shared Pool)之一:Library cache逻辑结构

What is shared pool? Shared pool是SGA中的一部分,由于它是SGA的一部分,这意味着它可以被所有的进程所访问.Shared pool物理层面上由许多内存块组成,这些内在块称为chunk.但是chunk是大小不一的,在内存中一个chunk是连续的. 按逻辑结构划分:Shared Pool主要包含了3部分:Library cache,Dictionary cache和Control Structure. 由于shared pool中最重要的是library cache

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 memory structures. It is used in a number of areas including the library cache. The library cache is a memory area that holds parsed cursor structures n

Library Cache: Lock, Pin and Load Lock

What is "Library cache lock" ? This event controls the concurrency between clients of the library cache. It acquires a lock on the object handle so that either: One client can prevent other clients from accessing the same object. The client can

rac数据库默认sql tuning advisor,导致大量library cache lock

问题现象:客户反映周六周日固定十点钟,一个程序会特别慢(大概10分钟),平时1到2秒.查看当时的日志发现:DBMS_STATS: GATHER_STATS_JOB encountered errors.  Check the trace file.Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl1/trace/orcl1_j002_51847.trc:ORA-04021: timeout occurred while waiting to l