1. 当Buffer Cache中的Dirty List长度达到阀值:
DBWR将Dirty List中的Dirty Buffer写入磁盘(user Server Process在LRU List中查找free buffer时将碰到的dirty blocks移入Dirty List)
2. 当user Server Process在Buffer Cache的LRU List中搜索了过长的时间而仍然没有找到free buffer:
DBWR直接从LRU List中将Dirty Buffer写入磁盘
3. 每过3秒钟:
DBWR把dirty buffers从LRU List移到Dirty List,一旦Dirty List长度达到阀值,DBWR便将数据写入磁盘
4. Checkpoint发生时:
DBWR把所有的dirty buffers从LRU List移到Dirty List,并且开始写数据
5. 当Tablespace开始Hot backup时:
DBWR把所有属于该表空间的dirty buffers从LRU List移到Dirty List,并且开始写数据
6. 当Tablespace offline时:
DBWR把所有属于该表空间的dirty buffers从LRU List移到Dirty List,并且开始写数据
7. 执行Drop时:
drop table或者index将促使DBWR先将属于该segment的dirty blocks写入磁盘
(谢谢Kamus 的总结!)
Database Writer (DBWn)
The server process records changes to undo and data blocks in the Database Buffer Cache. DBWn writes the dirty buffers from the Database Buffer Cache to the data files. It ensures that a sufficient number of free buffers (buffers that can be overwritten when server processes need to read in blocks from the data files) are available in the Database Buffer Cache. Database performance is improved because server processes make changes only in the Database Buffer Cache.
DBWn defers writing to the data files until one of the following events occurs:
•Incremental or normal checkpoint
•The number of dirty buffers reaches a threshold value
•A process scans a specified number of blocks when scanning for free buffers and cannot find any
•Timeout occurs
•A ping request in Real Application Clusters (RAC) environment
•Placing a normal or temporary tablespace offline
•Placing a tablespace in read-only mode
•Dropping or truncating a table
•ALTER TABLESPACE tablespace name BEGIN BACKUP
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10640532/viewspace-512077/,如需转载,请注明出处,否则将追究法律责任。