写的很明白啊pmon,dbw0,ckpt,lgwr,smon
这个是必开的后台进程reco是恢复进程,snp0是作业进程

解决方案 »

  1.   

    Background Processes
          Five required process        -- 重点,了解每个进程完成的功能
            1. SMON(System Monitor):
                Performs automatic instance recovery    -- 当Oracle实例失败,重启动时执行自动实例恢复
                    1. Rolls forward transactions (txns) in the online redo log that have not been recorded on disk
                    2. Open database and make unlocked data available
                    3. Rollback uncommitted txns
                Reclaims (de-allocates) space used by temporary segments no longer in use
                Merges contiguous areas of free space in the datafiles. Known as defragging or coalescing.    -- 重点
                (SMON coalesces the contiguous free space in a tablespace only if its default PCTINCREASE value = 0)
            2. PMON(Process Monitor): Cleans up abnormally terminated user sessions    -- 清理非正常中止的用户SESSION
                Rolls back any uncommitted transactions            -- 回滚未提交事务
                Releases locks held by a terminated process        -- 释放因进程中止而产生的锁???时间间隔???
                Frees SGA resources allocated to the failed process    -- 释放分配给失败进程的SGA资源
                Restarts failed shared server and dispatcher processes    -- 重启失败的共享服务和调度进程
            3. DBWn(Database Writer): Writes all changed (i.e. dirty) buffers to datafiles.    -- 将更新的buffer写入数据文件
                Uses a LRU (least recently used) algorithm to keep the most recently used blocks in memory.
                Defers writes for I/O optimization.
                Will write dirty blocks when one of the following occurs:    -- 重点,注意它与COMMIT没有必然关系
                    1. The dirty list reaches a threshold value
                    2. A process scans a specified number of buffers in the LRU list without finding a free buffer
                    3. A time-out occurs
                    4. A checkpoint occurs
                Note that it is the server process that records changes to rollback segments and data blocks in the buffer cache!
            4. LGWR(Log Writer): Writes information from the redo log buffer to the redo log files.    -- 将redo log buffer内容写入文件
                Will write redo log buffer entries to the redo log files when:    -- 重点
                    1. A commit occurs.
                    2. The redo log buffer pool becomes one-third full.
                    3. The redo log buffer has more than 1MB of recorded changes in it.    -- ?????与redo log buffer大小无关?
                    4. Before the DBW0 completes cleaning the buffer blocks as during a checkpoint.    -- 在DBW0之前完成
                       LGWR confirms the COMMIT only after the redo is written to disk.    -- LGWR完成后才能确认COMMIT完成
            5. CKPT(Checkpoint Process): Improves the performance of databases with many database files.
                Takes over LGWR's tasks of updating files at a checkpoint.
                Headers of datafiles and control files are updated at the end of a checkpoint.    -- 重点
                More frequent checkpoints will reduce the time required for instance recovery,
                    but potentially at the cost of reduced system performance
          Other optional process
              6. ARC0(Archiver Process): Copies online redo log files to a designated storage device when LGWR switches to a new group.
                Copies redo log files to tape or disk for media failure recovery.
                Operates only when a log switch occurs.        -- 可以自动,可以手动switch: ALTER SYSTEM SWITCH LOGFILE;
                Is only needed when the database is running in ARCHIVELOG mode and automatic archiving is enabled
                    (parameter LOG_ARCHIVE_START = TRUE)
            7. RECO (Recover Process) resolves failures involving distributed transactions.
            8. LCKn (Lock Process) performs inter-instance locking in a parallel server system.
            9. Pnnn (Parallel Query Process) performs: parallel query, parallel index creation, parallel data loading,
                                and parallel 'CREATE TABLE AS SELECT...'.
            10.SNPn (Snapshot Process) automatically refreshes snapshots (read only replicated tables).
                        It is also responsible for the server job queues and replication queues.
            11.S000...S999 (Server Processes)
                Parses and executes SQL statements.
                Reads data blocks from disk into the database buffer cache of the SGA.
                Returns the results of SQL statements to the user process.
                When a server process needs to read a data block from disk into the buffer cache it will:
                1. Search the LRU list.
                2. Look for a free buffer.
                3. Move dirty buffers to the dirty buffer list.
            12.D001...D999 (Dispatcher Process)
                Used with MTS.
                SQL*Net Listener determines if each user process can use a shared server process.
                SQL*Net Listener gives the user process the address of a dispatcher process.
                The dispatcher process connects a user process to a shared server process.
                When the user process requests it, the listener will create a dedicated server process
                    and connect the user process to it.