Oracle Server - Enterprise Edition
Information in this document applies to any platform.
How to identify blocks which cause latch contention on the 'cache buffers chains' latch.
How to identify a hot block within the database buffer cache.
Possible hot blocks in the buffer cache normally can be identified by a high or
rapid increasing wait count on the CACHE BUFFERS CHAINS latch.
This latch is acquired when searching for data blocks cached in the buffer cache.
Since the Buffer cache is implemented as a sum of chains of blocks, each of those
chains is protected by a child of this latch when needs to be scanned. Contention
in this latch can be caused by very heavy access to a single block. This can
require the application to be reviewed.
@As stated in @Note 42152.1 LATCH:CACHE_BUFFERS_CHAINS:
To solve a hot block, the application maybe need to be reviewed.
By examining the waits on this latch, information about the segment and the
specific block can be obtained using the following queries.
First determine which latch id(ADDR) are interesting by examining the number of
sleeps for this latch. The higher the sleep count, the more interesting the
latch id(ADDR) is:
Run the above query a few times to to establish the id(ADDR) that has the most
consistent amount of sleeps. Once the id(ADDR) with the highest sleep count is found
then this latch address can be used to get more details about the blocks
currently in the buffer cache protected by this latch.
The query below should be run just after determining the ADDR with
the highest sleep count.
Depending on the TCH column (The number of times the block is hit by a SQL
statement), you can identify a hotblock. The higher the value of the TCH column,
the more frequent the block is accessed by SQL statements.
In order to reduce contention for this object the following mechanisms can be put in place:
1) Examine the application to see if the execution of certain DML and SELECT statements
can be reorganized to eliminate contention on the object.
2) Decrease the buffer cache -although this may only help in a small amount of cases.
3) DBWR throughput may have a factor in this as well.
If using multiple DBWR's then increase the number of DBWR's.
4) Increase the PCTFREE for the table storage parameters via ALTER TABLE
or rebuild. This will result in less rows per block.
5) Consider implementing reverse key indexes
(if range scans aren't commonly used against the segment)
Related bugs :
Bug 3611471 : High latch waits for "cache buffers chain" latch possible originating from "kcbgtcr: kslbegin .."
Bug 1967363 "CACHE BUFFERS CHAINS" LATCH CONTENTION AFTER UPGRADE
TO 8.1.7 FROM 8.0.6
The following query joins with DBA_OBJECTS :
BUG:3611471 - FPFACCEP: APPS PERFORMANCE ISSUE(CACHE BUFFERS CHAIN WAITS) - BUG#3608873
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11134237/viewspace-627210/ ,如需转载,请注明出处,否则将追究法律责任。