ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Buffer Exterminate等待事件

Buffer Exterminate等待事件

原创 Linux操作系统 作者:is.x 时间:2011-05-22 12:20:55 0 删除 编辑

某信用卡中心核心交易系统在一时间段内出现交易超时情况,经查,当时大量会话出现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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-04-27

  • 博文量
    73
  • 访问量
    255656