当前位置: 首页 >> 技术文章 >> 数据库优化:Shared Pool 中 ges resource dynamic 和 ges enqueues 超高诊断
数据库优化:Shared Pool 中 ges resource dynamic 和 ges enqueues 超高诊断
发布时间:2018-08-08 发布人:eygle 66

在『云和恩墨大讲堂』微信群中,有朋友提出这样一个问题:

在自动内存管理下,Shared Pool 超高怎么办?

超高是多高呢?我们看一下下面的截图,Buffer Cache 最后被调节为只有 64M,这是最小值了,而Shared Pool Size 竟然高达 23,552M,超乎想象:

CacheSizes.jpg

分析的思路很简单,看一看这些共享内存被谁使用了,在以下细节中,ges resource dynamic 和 ges enqueues 超高,分别占用了 6G、9G,这显然是不正常的:

SGABreakdown.jpg

这个数据库的版本是:12.1.0.2.0,MOS 上很容易就可以找到匹配的 BUG:

ORA-04031 Errors Occurring with High "ges resource dynamic" & "ges enqueues" Memory Usage In The Shared Pool (文档 ID 2063751.1)

ORA-04031 errors occurring in a RAC instance with the trace file showing high memory usage for "ges resource dynamic" and "ges enqueues" memory in the shared pool. This can cause LMD processes to become unresponsive leading to an instance termination.

CAUSE

This is due to unpublished bug:21373473 fixed in 12.2, and occurs due to DX and BB locks being cached but not cleared out. This fix removes the need to cache DX and BB locks and hence reduces overall shared pool memory usage in RAC instances.

ORA-04031 errors occurring with high memory utilization for "ges enqueues" & "ges resource dynamic" memory allocations.

SOLUTION

Download and apply the one-off patch number 21373473 for your platform and version combination.

Please note that if using 12.1.0.2, then you should also apply the related patch number 21260431 which also impacts the shared pool memory allocations identified here.

This issue can also be worked around by setting _GES_DIRECT_FREE_RES_TYPE="CTARAHDXBB" in the instances.

解决方案是打补丁:21373473 。客户是 12.1.0.2 版本,需要 21260431 补丁。

临时解决方案是设置初始化参数: _GES_DIRECT_FREE_RES_TYPE="CTARAHDXBB"

记录供参考。


数据驱动,成就未来,云和恩墨,不负所托!