TOM 's "Oracle Programming Art 9i,10g,11g"
Pmon
Pmon , process monitoring. Pmon has 3 main uses:
1 to do cleanup after a non-normal interruption of the process. For example: dedicated server failed or was killed for some reason, this is pmon work in two ways. The first is to restore or revoke work done by dedicated server . The second is to release the resources that dedicated server uses. pmon will rollback , Release the lock, release sga space
2 , after the process abort , pmon for cleanup. pmon monitors oracle other background processes and rebuilds them when needed. lang= >dispatcher "en-US" shared server or pmon failed The is involved and rebuilds a shared server or dispatcher after the failed process has been cleaned up. For example, the LGWR process fails when the database is writing a log, which is a serious error. The safest way to solve this problem is to immediately interrupt the instance and recover.
3 , the third purpose of pmon is to oracle TNS listener Registers the instance information. When the instance starts, pmon queries the default port for oracle (1521 Port) is in a working state. If the port is already working, the instance can be started, pmon to tell listener , including the service name, instance information, and so on. If listener does not start, pmon will periodically attempt to connect listener . Note here that if oracle is not the default 1521 port, but instead uses a different port, The connection process for Pmon and listener is similar to the use of 1521 ports, except that, when using a nondefault port, the The address of the span lang= "en-US" >listener is specified in the parameter local_listener .
Smon
Smon , System monitoring. Smon 's work is as follows:
1. Clean up the temporary space.
2 , aggregate free space. If you use dictionary-managed to manage tablespaces,Smon will be responsible for aggregating the idle extent into large idle extent. This happens only if the table space is managed in dictionary-managed , and the parameter pctincrease is set to a value other than 0.
3 , recovery of transactions for unusable files. When the database is started,Smon restores the failed transactions, which were skipped when the instance was resumed or crash restored. For example: A brother file is not available on disk, and after the file is re-usable,Smon will recover it.
4 , an instance recovery is performed on a single node fault of the RAC . In a RAC environment, if an instance of cluster(cluster) fails (for example, the machine on which the instance resides is hung), the other node on this cluster will open the redo log of the failed instance , and recover failed instances
5 , clean the obj$. obj$ is a low-level data dictionary that contains almost all of the objects entryin the database. Most of the time, some entries objects have been removed, or the current entry represents no longer the newest objects. Smon is responsible for deleting the entry information.
6 , shrink undo segments. Smon will automatically shrink the rollback segment to the optimal size.
7 , offline rollback segments. The DBA may need to take a rollback segment of a transaction that is in active state offline. At this point, if the transaction is using this offline rollback segment, then the segment is not really offline, but is labeled "Pending Offline". In the background,Smon will always try to offline this segmentuntil it succeeds.
In addition,Smon refreshes the statistics of the view dba_tab_monitoring , and so on. Smon consumes a lot of CPU. Smon will periodically, or be woken up by other background processes, to perform cleanup work.
CKPT
CKPT , checkpoint process. The CKPT process is not checkpoint, as its name says, and checkpoint is dbwn 's work. It just comes to update the data file header. Before oracle8.0 ,CKPT is just an optional process. But after oracle8.0 , theCKPT process is opened. The checkpoint information used to update the header of the data file was LGWR , however, the burden ofLGWR became heavier as the database files increased. If LGWR to update the first, or even the file head, then there will be a lot of sessions waiting for a long time to commit. All CKPT to take the job.
Dbwn
Dbwn , data write process. The dbwn is responsible for writing the buffer's dirty data to disk. checkpointoccurs when the switch log files occur with Oracle . After the checkpoint occurs, the data in the redo log can be overwritten. If the redo log is filled and the redo log is re-used to hold the new data, and checkpoint is still complete,Oracle returns "Checkpointnot complete".
The performance of DBWN is quite important. If the dbwn is not fast enough to write the data, it will not be able to release the free buffer faster. Then the value of free Buffer Waits and Write complete Waits will grow quickly.
Oracle can configure up to five DBW processes. From DBW0 to DBW35. Most systems have only one DBW process, but there may be more than one DBW process in a multi- CPU system. The goal is to spread the burden of writing data to make sure there is enough free space in the SGA .
optimization, DBW is passed asynchronously (asynchronous ). Span lang= "en-us" >i/o writes data to disk. By asynchronous i/o , dbw first blocks form a batch (a bundle), and then batch to OS , DBW does not wait for os to write batch to disk, but returns, Continue to collect the next batch . When os completes the write, the DBW process is notified asynchronously, and batch succeeded Write to disk.
Finally, theDBW process writes data to disk in a decentralized manner. and LGWR is a continuous write redo log. It is much more time-consuming to distribute than to write in succession. However,DBW is distributed in the background, and LGWR does it in order to reduce the time the user waits.
question:TOM says dbwn is to make blocks a batch, and then asynchronously hand it over to the OSand let The OS is written to disk. Why do you say that dbwn is a decentralized writing data, writing data is not the work of the OS ?
Lgwr
LGWR , log write process. LGWR is the process of writing information about the redo log buffer in the SGA to the redo log file . LGWR will occur in the following situations:
1 , every 3 seconds, one lgwr
2, the commit of any transaction
3 , when redo log buffer is 1/3 full, or there is 1MB of data inside
For these reasons, it is not necessary to set the redo log buffer very large.
ARCn
ARCn , archive process. ARCn 's job was to LGWR the contents of the ARCn log file after the onlone redo log was filled . to other places. Archive logs can be used to make media recovery. Online redo log is used to recover data files when the instance fails. The archive log is used to recover data files when the media recovery .
Transferred from: http://zzwssfd.iteye.com/blog/1554629