Home » RDBMS Server » Performance Tuning » Data Buffer Cache and Dirty Blocks
Data Buffer Cache and Dirty Blocks [message #219928] Fri, 16 February 2007 14:49 Go to next message
Anand Ramaswamy
Messages: 111
Registered: January 2005
Senior Member
Hi,
Below is a para from Oracle 9i Concepts.

The buffers in the cache are organized in two lists: the write list and the least
recently used (LRU) list. The write list holds dirty buffers, which contain data that
has been modified but has not yet been written to disk. The LRU list holds free
buffers, pinned buffers, and dirty buffers that have not yet been moved to the write
list. Free buffers do not contain any useful data and are available for use. Pinned
buffers are currently being accessed.


Before reading a data block into the cache, the process must first find a free buffer.
The process searches the LRU list, starting at the least recently used end of the list.
The process searches either until it finds a free buffer or until it has searched the
threshold limit of buffers.
If the user process finds a dirty buffer as it searches the LRU list, it moves that
buffer to the write list
and continues to search.When the process finds a free buffer,
it reads the data block from disk into the buffer and moves the buffer to the MRU
end of the LRU list.
If an Oracle user process searches the threshold limit of buffers without finding a
free buffer, the process stops searching the LRU list and signals the DBW0
background process to write some of the dirty buffers to disk
.


I understand that there are dirty buffer in the Write List and dirty buffer in LRU List.

1)What is the difference between the two?

2)When DBW0 write dirty buffers to disk, are they from the Write List or from the LRU List or from both.


Regards,
qA
Re: Data Buffer Cache and Dirty Blocks [message #220614 is a reply to message #219928] Wed, 21 February 2007 07:02 Go to previous message
cbruhn2
Messages: 41
Registered: January 2007
Member
Remember there is only 1 buffer cache but 2 lists.

There is only one process responsible for writing buffer to disk dbwX (there could be slaves).
As stated in your quote

Quote:
The write list holds dirty buffers, which contain data that
has been modified but has not yet been written to disk.

So when buffer are being written by the dbw is will be from the write list.

The LRU list as you quote
Quote:
The LRU list holds free
buffers, pinned buffers, and dirty buffers that have not yet been moved to the write
list. Free buffers do not contain any useful data and are available for use.


best regards
Carl Bruhn
Previous Topic: ora-1555
Next Topic: Memory question
Goto Forum:
  


Current Time: Thu May 16 22:43:49 CDT 2024