暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

How are the Cache Buffers Chains and Cache Buffers LRU Chains used in the Buffer Cache management ?

2011-01-01
398

The Oracle (tm) Users' Co-Operative FAQ

How are the Cache Buffers Chains and Cache Buffers LRU Chains used in the Buffer Cache management ?


Author's name: Jonathan Lewis

Author's Email: Jonathan@jlcomp.demon.co.uk

Date written: 15th Dec 2002

Oracle version(s): 8.1 - 9.0

How are the Cache Buffers Chains and Cache Buffers LRU Chains used in the Buffer Cache management ?


The Cache Buffers Chains are very short chains (linked lists) that allow Oracle to locate a block very quickly if it is in the buffer. Each block hashes (by block address, tablespace number, and block type - I believe) to one of the chains. In Oracle 8 there are roughly twice as many chains available as there are buffers, so many chains are empty, and the remainder tend to have only one or two blocks in them - so scanning a chain can be very quick.

Chains are covered by Cache Buffers Chains latches. Each Cache Buffers Chains latch covers around 64 - 128 chains - the commonest sizes of db_block_buffers (or db_cache_size as it should be in oracle 9) mean that are typically 512 or 1024 chains, but this varies in powers of 2 as the size of the buffer cache grows.

The Cache Buffers LRU chains tell Oracle about how much use a buffer has had, and therefore allow it to decide quickly and cheaply which buffer to clear when someone wants to read a new block from disc. In fact the term LRU chain is somewhat obsolete, as Oracle 8.1 uses a touch count algorithm to decide on the popularity of a buffered block, nevertheless many details of the LRU algorithm still apply, and the chain of buffers still has blocks being 'pushed down' to be dropped off at the end if they have not been touched in the recent past.

 


Further reading: N/A



最后修改时间:2020-04-16 15:12:40
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论