Memory Notification Library Cache Object loaded into SGA
Jul232014
今日帮朋友分析AWR报告,顺便看了一眼告警日志,发现告警日志好多Memory Notification: Library Cache Object loaded into SGA提示。
数据库版本10.2.0.1.0 for AIX 5.3
Thu Jul 17 18:19:08 2014 Memory Notification: Library Cache Object loaded into SGA Heap size 2765K exceeds notification threshold (2048K) Details in trace file /oracle/admin/ora10g/udump/ora10g_ora_462864.trc KGL object name :select e.tsname tsname, sum(e.phyrds - nvl(b.phyrds,0)) reads, sum(e.phyrds - nvl(b.phyrds,0)) / :ela rps, decode(sum(e.phyrds - nvl(b.phyrds, 0)), 0, 0, 10 * (sum(e.readtim - nvl(b.readtim, 0)) / sum(e.phyrds - nvl(b.phyrds, 0)))) atpr, decode(sum(e.phyrds - nvl(b.phyrds,0)), 0, 0,
这是因为加载到SGA的对象大小大于数据库中设置的阀值大小,受隐含参数_kgl_large_heap_warning_threshold影响,该值在10.2.0.1.0版本默认是2M。
SQL> l 1 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' SQL> / NAME VALUE DESCRIPTION ----------------------------------- ---------- ------------------------------------------------------------- _kgl_large_heap_warning_threshold 2097152 maximum heap size before KGL writes warnings to the alert log
加载的对象只要超过2M,就会在告警日志中有所提示,如果不想让这些信息在告警日志中出现,可以将这个隐含参数的值设置为0或更大,ORACLE也知道这个值设置为2M有点小,在10.2.0.2.0及以后版本,这个值已经由默认的2M改为了50M。
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.
下面将这个隐含参数值修改为50M。
SQL> alter system set "_kgl_large_heap_warning_threshold"=52428800 scope=spfile; System altered. SQL>
隐含参数大部分都是静态参数,需要重启才能生效。
SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 536870912 bytes Fixed Size 1220460 bytes Variable Size 176160916 bytes Database Buffers 356515840 bytes Redo Buffers 2973696 bytes Database mounted. Database opened.
查看已经生效。
SQL> 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'; NAME VALUE DESCRIPTION ----------------------------------- ---------- ------------------------------------------------------------- _kgl_large_heap_warning_threshold 52428800 maximum heap size before KGL writes warnings to the alert log
————————————-end————————————–