【等待事件】buffer busy waits

renjixinchina發表於2013-10-24

Definition:

  • Versions:7.0 - 10.2 Documentation: 
  • This wait happens when a session wants to access a database block in the buffer cache but it cannot as the buffer is "busy". The two main cases where this can occur are:
  1. Another session is reading the block into the buffer
  2. Another session holds the buffer in an incompatible mode to our request

Reducing Waits / Wait times:

As buffer busy waits are due to contention for particular blocks then you cannot take any action until you know which blocks are being competed for and why. Eliminating the cause of the contention is the best option. Note that "buffer busy waits" for data blocks are often due to several processes repeatedly reading the same blocks (eg: if lots of people scan the same index) - the first session processes the blocks that are in the buffer cache quickly but then a block has to be read from disk - the other sessions (scanning the same index) quickly 'catch up' and want the block which is currently being read from disk - they wait for the buffer as someone is already reading the block in.

The following hints may be useful for particular types of contention - these are things that MAY reduce contention for particular situations:

Block Type Possible Actions
data blocks Eliminate HOT blocks from the application. Check for repeatedly scanned / unselective indexes. Change PCTFREE and/or PCTUSED. Check for 'right- hand-indexes' (indexes that get inserted into at the same point by many processes). Increase INITRANS. Reduce the number of rows per block.
segment header Increase of number of FREELISTs. Use FREELIST GROUPs (even in single instance this can make a difference).
freelist blocks Add more FREELISTS. In case of Parallel Server make sure that each instance has its own FREELIST GROUP(s).
undo header Add more rollback segments.

確定引起該等待的BLOCK或型別可以參照:

Resolving Issues Where ''buffer busy waits' When Concurrency for Buffers is High (Doc ID 1476043.1)
How to Identify The Segment Associated with Buffer Busy Waits (Doc ID 413931.1)


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15747463/viewspace-774921/,如需轉載,請註明出處,否則將追究法律責任。

相關文章