Heap size 80869K exceeds notification threshold (51200K)

oracle:Heap size 3597K exceeds notification threshold oracle:Heap size 3597K exceeds notification threshold 解决方法 立即下载

前阵子的alert日志获得了所需堆尺寸的大小超出指定阙值的提示,即Heap size 80869K exceeds notification threshold (51200K)。从Oracle 10.2.0.2之后该阙值已经增加到了50MB。通过LRU算法理论上来说应该是足够的。这个问题是由于SGA中碎片太多,一时间无法找到容纳当前语句于是抛出该提示信息。需要注意的是此时数据库并没有给出ora-04031错误提示。下面给出具体的描述。

一、alert 日志提取的提示信息

Fri Feb  7 19:47:21 2014
Memory Notification: Library Cache Object loaded into SGA
Heap size 80869K exceeds notification threshold (51200K)
Details in trace file /u02/database/UK3200/udump/UK3200_ora_6240.trc
KGL object name :INSERT INTO ACCOUNTING_FILE_DTL_TBL (ACCOUNT_CODE_ID, ACCOUNT_CODE, ACCOUNT_NAME, VOUCHER_NO, ACC_NUM, CURR_CD, ACCOUNT_PERIO
D, VALUE_DATE, TRANS_DATE, ACC_POS_HIST_ID, DEBIT_CREDIT, TRANS_DESC, TRANS_TYPE_CD, AE_ID, AMOUNT, CATEGORY, FX, DESCRIPTION, CUST_SUB_TYPE,
VOU_TYPE, DISPLAY_TYPE, IS_HIDE_WHEN_ZERO, TYPE_GRP, DESC_ACCTING_STD, ACCOUNT_JV_TYPE_ID, JV_DESC, INPUT_DATE ) WITH VOU_TBL AS ( SELECT A.AC
C_NUM, A.CURR_CD, SUBSTR (:B2 , 1, 6) AS ACCOUNT_PERIOD, A.VALUE_DATE, A.APPROVAL_DATE, A.TRANSACTION_C

Mon Feb 10 18:22:32 2014
Memory Notification: Library Cache Object loaded into SGA
Heap size 80865K exceeds notification threshold (51200K)
KGL object name :INSERT INTO ACCOUNTING_FILE_DTL_TBL (ACCOUNT_CODE_ID, ACCOUNT_CODE, ACCOUNT_NAME, VOUCHER_NO, ACC_NUM, CURR_CD, ACCOUNT_PERIO
D, VALUE_DATE, TRANS_DATE, ACC_POS_HIST_ID, DEBIT_CREDIT, TRANS_DESC, TRANS_TYPE_CD, AE_ID, AMOUNT, CATEGORY, FX, DESCRIPTION, CUST_SUB_TYPE,
VOU_TYPE, DISPLAY_TYPE, IS_HIDE_WHEN_ZERO, TYPE_GRP, DESC_ACCTING_STD, ACCOUNT_JV_TYPE_ID, JV_DESC, INPUT_DATE ) WITH VOU_TBL AS ( SELECT A.AC
C_NUM, A.CURR_CD, SUBSTR (:B2 , 1, 6) AS ACCOUNT_PERIOD, A.VALUE_DATE, A.APPROVAL_DATE, A.TRANSACTION_C

#udump下的日志文件达到724MB,这个是这个提示累计下来的结果
oracle@linux-1234:~> ls -hltr /u02/database/UK3200/udump/UK3200_ora_6240.trc
-rw-r----- 1 oracle oinstall 724M 2014-02-07 19:47 /u02/database/UK3200/udump/UK3200_ora_6240.trc


二、故障分析 
      对于一个需要执行的SQL或者PL/SQL时,该代码需要从library cache中分配一块连续的空闲空间来解析语句。Oracle首先扫描shared pool查找空闲内存,如果没有发现大小正好合适的空闲chunk,就查找更大的chunk,如果找到比请求的大小更大的空闲chunk,则将它分裂,多余部分继续放到空闲列表中。于是产生了碎片。系统经过长时间运行后,就会产生大量小的内存碎片。当请求分配一个较大的内存块时,尽管shared pool总空闲空间还很大,但是没有一个单独的连续空闲块能满足需要,则系统会根据LRU算法来淘汰那些不再使用的语句,这之后依旧一直无法分配到内存空间,则就可能产生4031错误。 
      通常情况下,如果检查发现shared_pool_size足够大,那4031错误一般就是由于碎片太多引起的。 
      尽管碎片无法避免,但应尽可能减少碎片。以下是可能产生碎片的一些潜在因素:
             没有使用共享SQL; 
             过多的没有必要的解析调用(软解析); 
             没有使用绑定变量

      对于我们的这个情况是内存够用,一时无法获得连续的空闲内存块。不过该insert语句的确比较长,接近400行。

关于shared_pool与SGA的分析 

--环境
SQL> select * from v$version where rownum<2;

BANNER
----------------------------------------------------------------
Oracle Database 10g Release 10.2.0.3.0 - 64bit Production

--下面是关于对象重载的查询结果,尽管存在一些INVALIDATIONS,总体表现良好
SQL> @reload_ratio.sql

NAMESPACE             GETS    GETHITS GETHIT_RATIO       PINS    PINHITS PINHIT_RATIO    RELOADS INVALIDATIONS
--------------- ---------- ---------- ------------ ---------- ---------- ------------ ---------- -------------
SQL AREA            607614     100098        16.47  268976344  267458010        99.44     103083        101598
TABLE/PROCEDURE    4601210    4474456        97.25   29426797   28904427        98.22     178625             0
BODY                 39663      34617        87.28    2503211    2490492        99.49       6638             0
TRIGGER              72063      70249        97.48    1631610    1628323         99.8       1470             0
INDEX                94655      51973        54.91     469366     380268        81.02       3599             0
CLUSTER              27630      27383        99.11      61368      60883        99.21        238             0
OBJECT                   0          0          100          0          0          100          0             0
PIPE                     0          0          100          0          0          100          0             0
JAVA SOURCE            160        150        93.75        239        102        42.68         84             0
JAVA RESOURCE           81         75        92.59        243        160        65.84         27             0
JAVA DATA              162        159        98.15       1130       1126        99.65          0             0

11 rows selected.

--关于library cache的命中率
SQL> SELECT SUM (pins) "Executions",
  2  SUM (reloads) "Cache Misses while Executing",
  3  ROUND ( (SUM (pins) / (SUM (reloads) + SUM (pins))) * 100, 2) "Hit Ratio, %"
  4  FROM V$LIBRARYCACHE;

Executions Cache Misses while Executing Hit Ratio, %
---------- ---------------------------- ------------
 303544356                       294260         99.9

--当前系统此时可用的空闲内存 
SQL> SELECT pool,name,bytes/1024/1024 FROM v$sgastat WHERE name LIKE '%free memory%' AND pool = 'shared pool';

POOL         NAME                       BYTES/1024/1024
------------ -------------------------- ---------------
shared pool  free memory                     91.7747498

--有关shared_pool 的advice,从结果来看,当前的shared_pool为340mb
SQL> SELECT shared_pool_size_for_estimate est_size,
  2  shared_pool_size_factor size_factor,
  3   estd_lc_size,
  4  estd_lc_memory_objects obj_cnt,estd_lc_time_saved_factor sav_factor
  5  FROM v$shared_pool_advice;

EST_SIZE SIZE_FACTOR ESTD_LC_SIZE    OBJ_CNT SAV_FACTOR
---------- ----------- ------------ ---------- ----------
       196       .5765           36       2822       .803
       232       .6824           71       4400      .8567
       268       .7882          106       5114      .9078
       304       .8941          142       6095      .9532
       340           1          177       7757          1
       376      1.1059          212       9903     1.0434
       412      1.2118          248      12080     1.0874
       448      1.3176          283      14288     1.1382
       484      1.4235          317      16277     1.1818
       520      1.5294          351      16612     1.2166
       556      1.6353          386      18515     1.2442
       592      1.7412          421      18663     1.2679
       628      1.8471          456      18885     1.2877
       664      1.9529          490      19127     1.3033
       700      2.0588          525      19255     1.3164

--当前的sga advice结果即便是增加到715mb,ESTD_DB_TIME时间为219849,效果并不理想
--也就是说增加sga的大小对当前数据库作用不大 
--Author: Leshami
--Blog  : http://blog.youkuaiyun.com/leshami   
SQL> select sga_size,sga_size_factor,estd_db_time from v$sga_target_advice order by 1;

  SGA_SIZE SGA_SIZE_FACTOR ESTD_DB_TIME
---------- --------------- ------------
       286              .5       675749
       429             .75       257214
       572               1       222542
       715            1.25       219849
       858             1.5       219048
      1001            1.75       219048
      1144               2       219048

三、Oracle提出的解决方案 
Memory Notification: Library Cache Object Loaded Into Sga (Doc ID 330239.1)  To Bottom

APPLIES TO: 
Oracle Database - Enterprise Edition - Version 10.2.0.1 and later 
Information in this document applies to any platform. 
Oracle Server Enterprise Edition 
. 
SYMPTOMS 
The following messages are reported in alert.log after 10g Release 2 is installed. 
        Memory Notification: Library Cache Object loaded into SGA 
        Heap size 2294K exceeds notification threshold (2048K) 
CHANGES 
Installed / Upgraded to 10g Release 2 
CAUSE 
These are warning messages that should not cause the program responsible for these errors to fail.  They appear as a result of new event messaging mechanism and memory manager in 10g Release 2. 
The meaning is that the process is just spending a lot of time in finding free memory extents during an allocate as the memory may be heavily fragmented.  Fragmentation in memory is impossible to eliminate completely, however, continued messages of large allocations in memory indicate there are tuning opportunities on the application.  
The messages do not imply that an ORA-4031 is about to happen. 

SOLUTION 
In 10g we have a new undocumented parameter that sets the KGL heap size warning threshold.   This parameter was not present in 10gR1.  Warnings are written if heap size exceeds this threshold. 
    
Set  _kgl_large_heap_warning_threshold  to a reasonable high value or zero to prevent these warning messages. Value needs to be set in bytes.

If you want to set this to 8192 (8192 * 1024) and are using an spfile:

(logged in as "/ as sysdba")

SQL> alter system set "_kgl_large_heap_warning_threshold"=8388608 scope=spfile ;

SQL> shutdown immediate 
SQL> startup

If using an "old-style" init parameter,

Edit the init parameter file and add

_kgl_large_heap_warning_threshold=8388608 
 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.

最终的解决: 

1、根据meatlink修改隐藏参数,不能确定该设置是否存在负面影响,也没有google到这个问题的答案
2、调整代码(略))
SQL> @hidden_para
Enter value for para: large_heap

KSPPINM                            KSPPSTVL              DESCRIB
---------------------------------  --------------------  ---------------------------------------------
_kgl_large_heap_warning_thresh old 52428800             maximum heap size before KGL writes warnings
                                                        to the alert log

SQL> alter system set "_kgl_large_heap_warning_threshold"=82809856 scope=spfile ;
科技中介服务机构想要提升服务效率,需要哪些数智工具支持?.docx 科技中介服务机构想要提升服务效率,需要哪些数智工具支持? 立即下载

相关推荐

分布式定时任务(XXL-JOB)整合达梦数据库 带源码

背景 1. 因公司需要可视化管理配置调度任务,查询项目选择XXL-JOB,它是开源项目,入手很简单,详情可以参考官方文档; 2. 因项目的机密性,选择数据库为国内知名的达梦数据库7,与Java项目的整合详情可以参考SpringBoot 集成 达梦数据库 maven依赖本地jar包; 3. 因XXL-JOB暂时没有找到集成达梦数据库的案例,博主自己整合DM7踩过很多的坑,特此整合一个简单可直接...

艾斯-李的博客 3815

Heap size xxK exceeds notification threshold解决

1、发现alert.log告警Memory Notification: Library Cache Object loaded into SGAHeap size 2757K exceeds notification threshold (2048K)2、用sys查看隐藏参数:select ksppinm, ksppstvlfrom x$ksppcv cv, x$ksppi pi where cv

大余的技术博客 1627

Western blot (WB) 灰度分析进阶指南:ImageJ 高效定量技巧与实战优化

本文详细介绍了使用ImageJ进行Western blot灰度分析的进阶技巧,包括批量处理、背景校正和疑难条带处理等实战优化方法。通过自动化宏脚本和动态背景校正,显著提升分析效率和准确性,特别适合科研人员处理复杂WB数据。

weixin_42557830的博客 901

Heap size exceeds notification threshold

转自网络 Tue Oct 16 18:41:06 2007Memory Notification: Library Cache Object loaded into SGAHeap size 5118K exceeds...

cri5768的博客 488

【异常】解决JDK21升级中的SecurityException: JCE无法验证BC提供者问题

本文详细解析了JDK21升级中常见的SecurityException: JCE无法验证BC提供者问题的根源与解决方案。核心在于JDK21强化了JCE安全验证,导致签名不合规的老版本Bouncy Castle库被拒绝。文章提供了通过Maven依赖树精准定位、排除旧版本并引入兼容的bcprov-jdk18on新库的完整步骤,以及清理缓存等实战技巧,帮助开发者彻底解决此兼容性问题。

weixin_29197051的博客 491

别再混淆了!深入浅出图解四元数姿态控制中的‘误差四元数’(附四种定义对比与仿真)

本文深入解析四元数姿态控制中的误差四元数定义差异,对比四种常见定义(如Q₀∘Q⁻¹与Q⁻¹∘Q₀)及其对PD控制性能的影响。通过刚体动力学仿真验证,揭示定义二(Q⁻¹∘Q₀)在无人机和航天器控制中的最优性能,提供工程实践建议与参数整定技巧,帮助开发者避免常见陷阱并提升控制效率。

weixin_42528191的博客 277

Heap size 56508K exceeds notification threshold (51200K)

1、首先查看下现有的_kgl_large_heap_warning_threshold值大小。今天上午检查某环境时发现alert日志有报错。发现是默认值,确实没修改过,直接修改了。过几天再观察下,应该可以解决的,

kevinyu998的博客 894

CMakeTestCCompiler.cmake错误解决

CMakeTestCCompiler.cmake错误解决欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 最近编译项目的时候,遇到一个cmake的错误,具体错误信息如下: /path-to-pr

昨夜星辰的博客 2万+

Oracle Heap size XXK exceeds notification threshold (2048K) 解决方法

数据库版本是10.2.0.1,使用EXPDP 导数据的时候,alert log 出现如下信息: Wed Oct 26 12:14:02 2011The value (30) of MAXTRANS parameterignored.kupprdp: master process DM00 started withpid=73, OS id=4731        to execute - SYS.

David Dai -- Focus on Oracle 7470

Xilnx大学计划/XUP ZYNQ ZU开发板

TUL PYNQ™-ZU板,基于Xilinx Zynq UltraScale+ MPSoC,是为Xilinx大学项目设计的,以支持Xilinx PYNQ (Python Productivi-ty for Zynq)开源框架和嵌入式系统开发。

weixin_57025922的博客 947

135、高通 ChromaTix 调优工具入门:参数含义、调优流程与效果对比

本文介绍了高通ChromaTix色彩调优工具的核心使用要点:1. ChromaTix是位于ISP管线中的色彩处理系统,核心任务是将原始色彩映射为符合人眼感知的"舒适"效果;2. 重点解析了饱和度、色调、亮度相关饱和度等关键参数的实际含义和调试陷阱;3. 分享了四步调优流程,强调需要基于多场景数据验证;4. 通过案例展示了参数调整带来的色彩改善效果;5. 总结了实用建议,包括保持单一变量调试、量化评估色差、关注极端场景表现等。文章指出ChromaTix调优是平衡不同场景需求的"妥协艺术",需要结合客观数据和主

sundong_81的博客 109

Memory Notification: Library Cache Object loaded into SGA

Memory Notification: Library Cache Object loaded into SGA / ORA-600 [KGL-heap-size-exceeded] (Doc ID 330239.1) Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later Oracle Cloud Infrastructure - Database Service -

sqlora的专栏 1107

滑模控制算法(SMC)讲解-案例(附C代码)

该文章介绍了滑模控制算法的原理实现步骤,特点及关键问题,最后以车辆控制案例来讲解滑模控制的整个步骤实现

heda3的博客 4111

Memory Notification: Library Cache Object loaded into SGA / ORA-600 [KGL-heap-size-exceeded] (文档 ID

APPLIES TO: Oracle Database - Enterprise Edition - Version 10.2.0.1 and later Information in this document applies to any platform. ***Checked for relevance 17-Aug-2014*** . SYMPTOMS In al

逝鸿的博客 2950

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

10G-19C都有ORA-00600 KGL-heap-size-exceeded问题处理

1、Set _kgl_large_heap_warning_threshold to a very large value.就是把这个对应值调大,在增大这个参数阈值之前,需要同时考虑加大 SGA_TARGET 和 SHARED_POOL_SIZE 15% 是SGA有更充足的内存。2、Set both _kgl_large_heap_warning_threshold and _kgl_large_heap_assert_threshold to zero.就是把这两个值都设置为0关闭告警。

huiyangxu blog 1353

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

解决Heap size *K exceeds notification threshold(2048K)

Memory Notification: Library Cache Object loaded into SGA Heap size 3827K exceeds notification threshold (2048K) ...

congqiongsheng3499的博客 414

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

_kgl_large_heap_warning_threshold参数引起的问题

_kgl_large_heap_warning_threshold参数引起的问题 =========================================================== 作者: luckysea(http://luckysea.itpub.net)发表于:2007.11.22 16:38分类: ORACLE 出处:http://luckysea.itpub.

大余的技术博客 1467

Heap size 2814K exceeds notification threshold (2048K)

客户反应alert.log以下警告一直出现: KGL object name :create table cjb_3 as select a.xn,a.xq,a.xkkh,a.xh,a.xm,a.kcmc,...

ctr29775的博客 207

Heap size 3059K exceeds notification threshold (2048K)

发现数据alter.log日志中报出大量Heap size 3071K exceeds notification threshold (2048K) 网上查找发现是数据库bug Oracle10g中,在load较大的对象进library cache中时,会记录以上警告。在版本10.2.0.1中,这个定义大对象的阈值是2M,这是有隐含参数_kgl_large_heap_w

怀素的专栏 1510

10G日志报错Heap size 2119K exceeds notification threshold (2048K)

客户日志里面报错,解决办法如下:NOTE:Thedefaultthresholdin10.2.0.1is2M.SothesemessagescouldshowupfrequentlyinsomeapplicationenvironmentsIn10.2.0.2,thethresholdwasincreasedto50M...

weixin_33747129的博客 127

Heap size 2498K exceeds notification threshold (2048K) 问题处理

一朋友的库告警经常性报Heap size exceeds 下面是症状: 点击(此处)折叠或打开 Heap size 2498K exceeds ...

cizhaorun3127的博客 199

Heap size 5612K exceeds notification threshold (2048K)

10g日志文件报Heap size 5612K exceeds notification threshold (2048K)2008-03-31 10:09 RHEL4+Oracle 10g(10.2.0.1) 日志文件一直报...

congban8141的博客 164
上一篇: rac 卸载手动
下一篇: Heap size 2757K exceeds notification threshold (2048K)
柳暗发明君
博客等级 码龄18年 63粉丝 80原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值