Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Interaction between databse cache, DBWR and datafiles
I'm trying to explain the mechanisms of the interaction between the
buffer cache, dbwr and the datafiles to others and as often happens
i've confused myself so that I no longer understand myself!
As I understand it the process works like this
1. there are two "lists" describing the buffers: the LRU list and the
dirty list
2. when a request to access data is made (to read or write) the LRU
list is searched from the LRU end up
3. if the relevant buffer is found it is moved to the MRU end,
modified and marked dirty
4. if it isn't found, the block is read into the middle of the LRU
list, or the MRU end, or the first free block from the LRU end
depending on which document you read(?)
5. while it is searching for a free buffer any dirty buffers
encountered are moved to the dirty list
6. If no free buffers are found by the threshold limit (or the timeout
occurs), dbwr writes the buffers in the dirty list to disk
7. the newly found free buffer is written to and then moved to the MRU
end and marked dirty therefore moving the older dirty buffers down the
list
it is step 4 that most troubles me as the documentation seems to contradict itself
Also The other questions I can't answer by reading the documentation
are:
* Is a buffer "block sized" ie, one block per buffer?
I think my problems stem for not understanding the difference between "clean" and "free" I would suppose free means empty and clean means full but matching the datafile block. Also I can't see the point in writing dirty buffers to disk in order to free them because then they are recently used but emptied (if that is indeed the case) Received on Thu Jan 30 2003 - 09:07:48 CST