Latch wait posting
refer:
The _latch_wait_posting parameter has three possible values. The default value is 1, which means that latch wait posting is used for the "long" latches only. The alternative values are 0 (to disable latch wait posting entirely) and 2 (to enable latch wait posting for all latches).
The note that you have quoted is incorrect at 2 points: It implies that processes do not bother to spin for long latches. In fact they do. A cursory glance at some latching statistics should be enough to convince you of that fact. The note also states that all waiters are posted when a long latch is freed. Again, the statistics demonstrate that this is not the case, although you would need heavy contention to see it. If it were so, the waiters woken statistics would rise exponentially with sleeps during episodes of latch contention, whereas in fact it just rises linearly.
I'm reading your excellent "Oracle8i Internal Services" book. I've some questions about "latch wait posting" on page 27:
How does the Oracle process (releasing a latch) decide which process will be woken-up in latch free list?
How is that list managed? If it is FIFO, what is the diffrence from basic enqueue?
Is there still spinning for that mode, or is there just waiting for being posted by another process?
Note 104426.1 says:
Short Wait Latches
------------------
Short wait latches are characterised by the expectation that waiters will
not have to wait for any excessive duration prior to getting the latch.
Because of this, waiters spin on the cpu until the latch is freed.
Once the latch is freed the process grabs the latch and performs whatever
operation it was waiting to perform. When a short wait latch is freed by a
process no other processes are notified; the latch is simply freed.
Long Wait Latches
-----------------
Long wait latches are expected to be held for longer periods of time, so when
an attempt to get the latch is unsuccessful, the process goes to sleep for a
period of time, wakes up, and retries the latch get operation, repeating this
cycle until the latch get is successfully grabbed.
This procedure prevents excessive cpu being used as would be the case if the
procedure was to spin on a latch that is being held for a long time.
When the latch is freed, all waiters are posted to tell them that the latch
is free. Among other things this:
o prevents waiters from sleeping unnecessarily if the latch is free
o give waiters an equal chance of grabbing the latch
An example of a long wait latch is the library cache latch since
finding matching SQL in a hash chain has the potential to be a long running
activity.
The parameter _latch_wait_posting changes behavior. of short
wait and long wait latches.
I'm confused. If "Long Wait Latches" use the "latch wait posting" mecahnism, how does '_latch_wait_posting' change the behavior. of long wait latches?
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7728585/viewspace-620242/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Identify Which Latch is Associated with a "latch free" wait-413942.1IDEAI
- v$latch 的wait_timeAI
- 轉:latch wait events 說明分析AI
- 關於no-wait latch 的疑問AI
- 模擬產生CBC LATCH與buffer busy wait等待事件AI事件
- Latch Free Wait Contention Causes Performance Degradation-1476736.1AIORM
- latch: row cache objects 和cursor: pin S wait on X共同出現ObjectAI
- 金融業務_過賬_posting
- Oracle Latch及latch衝突Oracle
- sql version count引發cursor:pin s wait x及library cache latch library cache lockSQLAI
- Oracle KSL Latch 管理層 與 Latch管理Oracle
- SAP MM 盤點憑證上的posting blockBloC
- 【WAIT】wait eventAI
- cbc latch或cache buffer chains latch系列一AI
- oracle 11g latch之v$latch系列二Oracle
- oracle 11g latch之v$latch系列三Oracle
- Oracle Latch & LockOracle
- mutex,latch,lock,enqueue hash chains latch基礎概念MutexENQAI
- 【go語言】wait,wait for meGoAI
- ORACLE LOCK,LATCH,PINOracle
- Oracle Latch 說明Oracle
- [Oracle Script] check latchOracle
- 【筆記】lock and latch筆記
- latch free等待事件事件
- oracle latch優化Oracle優化
- mutex compare latchMutex
- latch入門?(最新更新part4:這才是真正的latch)---你所不知道的latch
- FI-AA Transaction type 100 not possible (posting to affiliated company)
- 優化Shared Pool Latch與Library Cache Latch競爭優化
- 學習動態效能表(11)--v$latch$v$latch_children
- 10.2出現SQL Memory Manager latch型別的latch freeSQL型別
- (ZT)Important SAP Notes on Configuration of MM-FI AAA PostingImport
- Latch free等待事件(轉)事件
- latch等待事件彙總事件
- cache buffers LRU chain latchAI
- [Oracle Script] latch holderOracle
- Latch: cache buffer chains (%)AI
- latch 相關等待事件事件