Operations that affect the contents of the SGA require that a process acquire a latch. A latch is similar to a lock, but instead of preventing two sessions from concurrently changing the same row, a latch prevents two sessions from altering the same area in shared memory at once.
Latches are usually held for a very brief interval. In a healthy database, there should be little or no contention for latches. Unfortunately, very busy databases often suffer considerably from latch contention.
If a process requires a latch and cannot obtain it on the first attempt, a latch miss results. The session repeatedly attempts to obtain the latch up to the value of the configuration parameter SPIN_COUNT. This technique is known as acquiring a spin lock. If the session still cannot obtain the latch, then the session relinquishes the CPU and a latch sleep results. A latch sleep is recorded as a latch free wait. When the session wakes up, it repeats the attempt to obtain the latch.
The latches that contribute to a high proportion of misses or sleeps deserve attention. Not surprisingly, the latches that are used most heavily (and which typically suffer the most contention), are the latches associated with the three major areas of the SGA. They are:
For more information on latch contention, see Spin Count And Latch Sleeps.
For more information on changing the value of SPIN_COUNT, see Spin Count And Latch Sleeps and the Tuning | Latch Page.
For more information on latches in general, see Buffer Cache Latches, Library Cache Latches, and Redo Buffer Latches.
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 使用条款 隐私 Cookie Preference Center