cache buffers LRU chain latch

不一樣的天空w發表於2018-02-03
  This latch is needed when user processes try to scan the LRU (least recently used) chain containing blocks in the buffer cache. This latch must be acquired before the block can be inserted into (when the block is read in from the disk) or taken out of the LRU chain (when the block is written down to the disk).

Solutions:
 1)Consider implementing multiple buffer pools to reduce contention on this latch.
 2)Increase the number of LRU latches with the parameter DB_BLOCK_LRU_LATCHES. Generally the default value works.
 3)Reduce data blocks visited by a query and thereby reduce LRU latch requests in the buffer pool by tuning the SQL.

cache buffers lru chain latch爭用主要由於過多空閒緩衝區請求導致,如下情況可能導致該latch競爭:
1)低效SQL
2)過小的buffer cache
3)過多的檢查點

cache buffers chains latch與cache buffers lru chain latch區別:
1)前者在多個會話同時訪問同一個表或索引,甚至集中在某個熱塊時發生,後者發生在多個會話分別訪問不同表導致空閒緩衝區爭用而引發
2)後者一般伴隨物理IO(索引掃描時db file sequential read,全表掃描時db file scattered read)

參考:等待事件_cache_buffers_lru_chain_latch
http://blog.itpub.net/18922393/viewspace-712721/


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

相關文章