There is a dirty list (that is, write list) Statement in Oracle, but there is also a checkpoint queue. These two items are often confusing. Are they the same thing? What is the relationship between them?
Before proceeding, let's take a look at the description of a master.
Http://www.ixora.com.au/q+a/0103/07160329.htm
That information is not quite right. it is more accurate to say that there are 10 lists, because there are 5 types of buffers and there is a main and auxiliary list for each type. also, there is no separate hot list. the hot list is a sublist of the main replacement list. of course, there are separate lists for each working set (LRU latch set) of buffers.
You can see all these structures in buffers dumps. Here is an extract...
(WS) Size: 10000 wsid: 1 State: 0 (ws_repl_list) main_prev: 32 aefbc main_next: 32ae51c aux_prev: 32c94a0 aux_next: 32c94a0 curnum: 10000 auxnum: 0 cold: Limit hbmax: 5000 hbufs: 5000 (bytes) main_prev: Primary main_next: 32c94b4 aux_prev: 32c94bc aux_next: Primary curnum: 0 auxnum: 0 (bytes) main_prev: Primary main_next: Primary aux_prev: Primary aux_next: export curnum: 0 auxnum: 0 (bytes) main_prev: 32c94ec main_next: 32c94ec aux_prev: Using aux_next: Using curnum: 0 auxnum: 0 (bytes) main_prev: Using main_next: Using aux_prev: 32c9510 aux_next: 32c9510 curnum: 0 auxnum: 0
Other than the replacement lists, the other lists are for different types of write buffers. from the bottom up they are buffers that have to be written for a checkpoint range call, a checkpoint object call, a ping, or merely because they are dirty. in each case the main list holds buffers which have yet to be written, and the auxiliary list holds buffers for which a write is pending. the auxiliary replacement list holds unpinned buffers for which a write has been completed, and any other buffers that are immediately reusable. the main replacement list is what is commonly called the LRU list. the operation of the LRU list was explained under the heading the 8i buffer cache in the October issue of ixora news. you may also be interested in the section on dbwn's new tricks in the September issue.
These 10 lists are mutually exclusive. each buffer can only be on one of the lists at a time. for completeness it shoshould also be mentioned that dirty buffers are also on a thread checkpoint queue and a file checkpoint queue. these queues are maintained in first modification (low RBA) order and are used to optimize checkpoint processing.
That is to say, in Oracle 8, there are actually five categories of lists in buffer cache, and there are 10 sub-categories in addition to the auxiliary lists. The four categories (eight small lists) are collectively referred to as the write list. They recorded various status information about dirty buffer. Generally, the LRU list has only one category. There are actually two types of lists. That is, replacement lists. In fact, in the 9i version, lists has been added, which is roughly 12 small classes of lists. I will not elaborate much here. (Note that classes are used here instead of the number of items, because the number is actually related to the db_block_lru_latches parameter. In 9i, This is a hidden parameter)
The buffer status (they are buffers that have to be written for a checkpoint range call, a checkpoint object call, a ping, or merely because they are dirty ). Since the buffer status in write lists may be converted and there is no time order, that is, if the buffer is written to the disk according to this lists, the sequence is not consistent with the time sequence of buffer changes. This also directly results in checkpoints fully refresh dirty buffer in versions earlier than Oracle 8. That is to say, when a checkpoint occurs, all dirty buffers will be written to the disk, in addition, dirty buffer cannot be generated at this time. Otherwise, Oracle cannot determine whether to write all the dirty buffer before the checkpoint time to the disk.
Checkpoint queue has appeared since Oracle 8. The checkpoint queue is sorted by the buffer's low RBA, that is, by the time point when the buffer changes for the first time. The same dirty buffer exists in both the buffer status and the write lists, and records the time sequence in which the buffer changes for the first time. In this way, dbwr writes dirty buffer according to the sequence in the checkpoint queue, which ensures that it is written to the disk in the order of the first time the buffer changes. This mechanism supports the implementation of the incremental checkpoint function of oracle. That is to say, when an incremental check point occurs, only the end time of the written buffer is determined. During this check point, the dirty buffer can be generated continuously, dbwr does not write all dirty buffers to the disk at one time. This greatly improves the efficiency of the checkpoint.
In fact, the combination of checkpoint queue and write list can simulate asynchronous Io while implementing incremental checkpoints. This issue will be discussed later.
For more information about checkpoint, see
Http://blog.csdn.net/biti_rainy/archive/2004/07/12/learn_oracle_20040712_1.aspx