Oracle buffer busy waits

 buffer busy waits

This wait indicates that there are some buffers in the buffer cache that multiple processes are attempting to access concurrently. Query V$WAITSTAT for the wait statistics for each class of buffer. Common buffer classes that have buffer busy waits include data blocksegment headerundo header, and undo block.

多个进程同时访问Buffer cache中的相同数据导致。常见的遭遇buffer busy waits 的缓冲类包括: data blocksegment headerundo header, 和undo block

Check the following V$SESSION_WAIT parameter columns:

  • P1: File ID

  • P2: Block ID

  • P3: Class ID

 Causes

To determine the possible causes, first query V$SESSION to identify the value of ROW_WAIT_OBJ# when the session waits for buffer busy waits. For example:

确定问题的原因,需要结合V$SESSION 和DBA_OBJECTS,详细参见如下示例:

SELECT row_wait_obj# 
  FROM V$SESSION 
 WHERE EVENT = 'buffer busy waits';

To identify the object and object type contended for, query DBA_OBJECTS using the value for ROW_WAIT_OBJ# that is returned from V$SESSION. For example:

SELECT owner, object_name, subobject_name, object_type
  FROM DBA_OBJECTS
 WHERE data_object_id = &row_wait_obj;
 
  
 Actions

The action required depends on the class of block contended for and the actual segment.

  解决方法依赖于class of block contended 和actual segment。

segment header

If the contention is on the segment header, then this is most likely free list contention.

Automatic segment-space management in locally managed tablespaces eliminates the need to specify the PCTUSEDFREELISTS, and FREELIST GROUPS parameters. If possible, switch from manual space management to automatic segment-space management (ASSM).

尽可能的将MSSM转化为ASSM.

The following information is relevant if you are unable to use ASSM (for example, because the tablespace uses dictionary space management).

free list is a list of free data blocks that usually includes blocks existing in several different extents within the segment. Free lists are composed of blocks in which free space has not yet reached PCTFREE or used space has shrunk below PCTUSED. Specify the number of process free lists with the FREELISTSparameter. The default value of FREELISTS is one. The maximum value depends on the data block size.

To find the current setting for free lists for that segment, run the following:

SELECT SEGMENT_NAME, FREELISTS
  FROM DBA_SEGMENTS
 WHERE SEGMENT_NAME = segment name
   AND SEGMENT_TYPE = segment type;

Set free lists, or increase the number of free lists. If adding more free lists does not alleviate the problem, then use free list groups (even in single instance this can make a difference). If using Oracle RAC, then ensure that each instance has its own free list group(s)


data block

If the contention is on tables or indexes (not the segment header):

若争用是在表或者索引上(非segment header)

  • Check for right-hand indexes. These are indexes that are inserted into at the same point by many processes. For example, those that use sequence number generators for the key values.

    检查右侧 indexe

  • Consider using ASSM, global hash partitioned indexes, or increasing free lists to avoid multiple processes attempting to insert into the same block.

     使用ASSM,全局hash分区索引或者是增加free list 来避免多个进程插入相同的块。

 undo header

For contention on rollback segment header:

  • If you are not using automatic undo management, then add more rollback segments.

    若未使用auto undo management就增加更多的rollback segments。

undo block

For contention on rollback segment block:

  • If you are not using automatic undo management, then consider making rollback segment sizes larger.

    若未使用auto undo management可考虑增大rollback segment 大小。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值