Buffer Exterminate等待事件

某信用卡中心核心交易系统在一时间段内出现交易超时情况,经查,当时大量会话出现Buffer Exterminate等待事件。

 

buffer cache中的部分空间正进行动态回缩时,有会话试图访问buffer cache中被选择空间释放的granule中的data block时,就会发生buffer exterminate等待。当buffer被释放(比如从buffer cache hash chainLRU chain上移除)后,等待的会话就能够重载该block到剩余的一个db cache granule中去,然后其他会话就可以通过hash查找找到新的该blockbuffer address

 

sql的等待事件"buffer exterminate"来看,当时buffer cache可能正在进行空间动态回缩,而会话要访问的数据块正好在需要释放的buffer cache中,所以出现等待。

 

等待事件“buffer exterminate”ASMM的特性相关,这个行为是这个特性所期望的。从当时的awrash报告中发现,buffer cache内存空间确实进行了回缩,同时shared pool的空间进行了增长,猜测当时可能有大量的sql需要进行硬解析。

 

ASMM的内存重分配有可能影响数据块的访问,其调整依赖于buffer advisory。由于ASMM特性带来一定程度的不可控以及BUG,一般重要系统不建议使用自动内存调整特性。在有良好依据的情况下,人为设置内存参数完全可以代替ASMM,甚至比ASMM更好。

 

 通过以下2个选择可以避免或减少这个问题:

 

a. 设置sga_target=0来禁用ASMM特性,手动分配内存;

 

b. 设置各sga组件的最小值。设置最小值后,可以一定程度上减轻内存重分配的频繁度与深度。

 

Metalink说明:

 

This wait event usually occurs when you have tried to dynamically resize a component of the SGA such as the buffer cache.

The "buffer exterminate" waits can only happen if part of the buffer cache is being dynamically shrunk and a session wants access to a data block that resides in a db cache buffer within a granule chosen to be freed. After the buffer is freed (removed from buffer cache hash chain, LRU chain, etc.), one of the waiting sessions can then reload that block into one of the remaining db cache granules, and everyone else eventually finds the new buffer address for the data block via hash lookup.

You can check the following views to see if any recent SGA Component resize operations have taken place :

V$SGA_DYNAMIC_COMPONENTS displays information about the dynamic SGA components. This view summarizes information based on all completed SGA resize operations since instance startup.

V$SGA_CURRENT_RESIZE_OPS displays information about SGA resize operations which are currently in progress. An operation can be a grow or a shrink of a dynamic SGA component.

V$SGA_DYNAMIC_FREE_MEMORY displays information about the amount of SGA memory available for future dynamic SGA resize operations.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20750200/viewspace-695895/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/20750200/viewspace-695895/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值