About Data buffer cache and LRU....

From: Aman Sharma <amansharma1981_at_gmail.com>
Date: Sat, 5 Apr 2008 06:26:10 -0700 (PDT)
Message-ID: <0de6c4d6-3864-45b8-a7d7-5d9b065a9f8f@i36g2000prf.googlegroups.com>


Hi there,
I have a small doubt in the working of data buffer cache.Please help me to understand it.
For the incremental checkpoint to happen , Oracle maintains the checkpoint queue(dirty queue also I
guess was the old name).Its mentioned that there are two lists, one is LRU and is LRUW.The LRUW
list contains the dirty buffers which are moved from the lru list to the LRUW list and willbe the
candiate for the flushing to the datafile by dbwr.I was under the impression that Checkpoint queue
contains the list of the blocks which are dirty and this list is scanned and flushed by dbwr by the
setting of the fast_start_mttr_target.But here is one quote from 10g Performance tuning(OU) book
<quote>
To allow buffer replacements to occur, it is necessary to write cold dirty buffers that have aged
out to the cold part of the list. Such writes are referred to as aging writes and are performed by
DBWn processes. The DBWn processes work to write enough cold buffers to guarantee a uniform supply
of free buffers for replacement purposes. However, because a hot buffer located in the hot part can
have the first change in the redo log, aging writes might not be able to advance the thread
checkpoint used for crash recovery purposes. That is why another list called the checkpoint queue,
which orders buffers in lowest redo block address (RBA) order, is used in addition to the LRU list.
Each working set contains two checkpoint queues each protected by a separate checkpoint queue latch
of type checkpoint queue. This allows user processes to add buffers to one list while DBWn is
writing buffers from the other list.</quote> From this quote, here are the fewlines which I could not understand.These are in quotes.
>>However, "because a hot buffer located in the hot part can have the first change in the redo log,
aging writes might not be able to advance the thread checkpoint used for crash recovery purposes.
That is why another list called the checkpoint queue, which orders buffers in lowest redo block
address (RBA) order, is used in addition to the LRU list." Each working set contains two checkpoint
queues each protected by a separate checkpoint queue latch of type checkpoint queue. This allows
user processes to add buffers to one list while DBWn is writing buffers from the other list.<<
Here are the doubts,
1)Is the first change that is mentioned here is called the high RBA? 2)What does it mean by this line "because a hot buffer located in the hot part can have the first
change in the redo log, aging writes might not be able to advance the thread checkpoint used for
crash recovery purposes. That is why another list called the checkpoint queue, which orders buffers
in lowest redo block address (RBA) order" 3)Here is what I have understood that the LRUW list contains the blocks in the order of their most
recent change and the checkpoint queue contains the link list of the low RBAs.Thsi means that when
the incremental checkpoint will be requiredthat Oracle will flush the data from the LRUW first but
it may be not the first change that is done to the block so to contain that change , the CKPTQ is
maintained.is this correct sir?
4) What time than CKPTQ will be flushed? Thanks and regards
Aman.... Received on Sat Apr 05 2008 - 08:26:10 CDT

Original text of this message