亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

11.20號(hào)------oracle background process(后臺(tái)

系統(tǒng) 2060 0

一.Background Processes

To maximize performance and accommodate many users, a multiprocess Oracle system uses some additional Oracle processes called background processes .

后臺(tái)進(jìn)程定義:為了最大的性能和容納更多的用戶,oracle使用額外的進(jìn)程被叫做后臺(tái)進(jìn)程處理。

11.20號(hào)------oracle background process(后臺(tái)進(jìn)程)

二、后臺(tái)進(jìn)程主要包括:

Database Writer Process(DBWn)

Log Writer Process(LGWR)

CheckPoint Process(CKPT)

System Monitor Process(SMON)

Process Monitor Process(PMON)

Recoverer Process(RECO)

Job Queue Processes

Archiver Processes(ARCn)

Queue Monitor Processes (QMNn)

Other Background Processes

三、DBWR

在什么觸發(fā)dbwr進(jìn)程的條件:

1.當(dāng)臟緩沖區(qū)的數(shù)量超過了所設(shè)定的限額。

2.當(dāng)所設(shè)定的時(shí)間間隔到了。

3.當(dāng)有進(jìn)程需要數(shù)據(jù)庫高速緩沖區(qū)卻找不到空閑的緩沖區(qū)時(shí)。

4.當(dāng)校驗(yàn)點(diǎn)發(fā)生時(shí)。

5.當(dāng)某個(gè)表被刪除或被截?cái)鄷r(shí)。

6.當(dāng)某個(gè)表空間被設(shè)置為只讀狀態(tài)時(shí)。

7.當(dāng)使用類似于alter tablespace users begin backup的命令對(duì)某個(gè)表空間進(jìn)行聯(lián)機(jī)備份時(shí)。

8.當(dāng)某個(gè)臨時(shí)表空間被設(shè)置為只脫機(jī)狀態(tài)或正常狀態(tài)時(shí)。

可通過設(shè)置DB_WRITER_PROCESSES的參數(shù)來讓多個(gè)DBWR來進(jìn)行寫操作

1.show parameter db_writer_processes

2.alter system set db_writer_processes=9 scope=spfile(網(wǎng)有說是最多10個(gè)dbwr同時(shí)進(jìn)行寫操作,但是官方的文檔上說有20個(gè) ,本人沒有測(cè)試過 )

3.shutdown immediate

4.startup

官方文檔關(guān)于dbwn的說明

Database Writer Process (DBW n )

The database writer process (DBWn) writes the contents of buffers to datafiles. The DBW n processes are responsible for writing modified (dirty) buffers in the database buffer cache to disk. Although one database writer process (DBW0) is adequate for most systems, you can configure additional processes (DBW1 through DBW9 and DBWa through DBWj) to improve write performance if your system modifies data heavily. These additional DBW n processes are not useful on uniprocessor systems.

數(shù)據(jù)庫的dbwn進(jìn)程主要是把緩存的內(nèi)容寫到數(shù)據(jù)文件中。dbwn進(jìn)程主要負(fù)責(zé)把數(shù)據(jù)庫的高速緩存中的臟數(shù)據(jù)寫到硬盤上。雖然一個(gè)dbwn進(jìn)程能夠滿足大部分的系統(tǒng),如果你的系統(tǒng)臟數(shù)據(jù)太多,你也可以配置(dbw1到dbw9或dbwa到dbwj)來改善寫性能。在單進(jìn)程的系統(tǒng)上增加dbwn進(jìn)程沒有用。

When a buffer in the database buffer cache is modified, it is marked dirty . A cold buffer is a buffer that has not been recently used according to the least recently used (LRU) algorithm. The DBW n process writes cold, dirty buffers to disk so that user processes are able to find cold, clean buffers that can be used to read new blocks into the cache. As buffers are dirtied by user processes, the number of free buffers diminishes. If the number of free buffers drops too low, user processes that must read blocks from disk into the cache are not able to find free buffers. DBW n manages the buffer cache so that user processes can always find free buffers.

在數(shù)據(jù)庫高速緩存中當(dāng)有一個(gè)緩存被修改,它就變成了臟數(shù)據(jù)了。一個(gè)冷緩存就是最近沒有被訪問的緩存塊。dbwn進(jìn)程寫冷塊,臟緩存到硬盤,所以用戶進(jìn)程能夠找到冷塊,清除緩,能把新的塊讀進(jìn)緩存中去。緩存被用戶進(jìn)程變臟,空閑緩存的數(shù)量就變少了。如果空閑的緩存下降的太少了,如果緩存不能找到空閑的塊用戶進(jìn)程就必須從硬盤中讀塊。dbwn管理著高速緩存是為了讓用戶進(jìn)程總能找到空閑的緩存。

By writing cold, dirty buffers to disk, DBW n improves the performance of finding free buffers while keeping recently used buffers resident in memory. For example, blocks that are part of frequently accessed small tables or indexes are kept in the cache so that they do not need to be read in again from disk. The LRU algorithm keeps more frequently accessed blocks in the buffer cache so that when a buffer is written to disk, it is unlikely to contain data that will be useful soon.

寫冷,臟塊緩存到硬盤,當(dāng)保存最近使用的緩存在內(nèi)存中是為了讓dbwn提高找到空閑的性能。比如,頻繁的訪問一個(gè)小表和索引放在緩存中,是為了他們不需要再次的從硬盤中讀取數(shù)量。在高速緩存中用最近最少使用算法保存著頻繁訪問的塊,為了當(dāng)一個(gè)緩存被寫到硬盤,不太可能和數(shù)據(jù)可能被很快就使用。

The initialization parameter DB_WRITER_PROCESSES specifies the number of DBW n processes. The maximum number of DBW n processes is 20. If it is not specified by the user during startup, Oracle determines how to set DB_WRITER_PROCESSES based on the number of CPUs and processor groups.

db_writer_processes初始化參數(shù)指定dbwn進(jìn)程的數(shù)量。dbwn進(jìn)程的數(shù)量最多是20。如果在運(yùn)行期間用戶沒有指定,oracle會(huì)以cpu的數(shù)量和進(jìn)程組來確定db_writer_processes的數(shù)量。

The DBW n process writes dirty buffers to disk under the following conditions:

dbwn進(jìn)程寫臟數(shù)據(jù)到硬盤在下面的幾種情況:

  • When a server process cannot find a clean reusable buffer after scanning a threshold number of buffers, it signals DBW n to write. DBW n writes dirty buffers to disk asynchronously while performing other processing.

  • 當(dāng)在掃描緩存的數(shù)量之后服務(wù)進(jìn)程不能找到一個(gè)干凈的可復(fù)用的緩存,它就標(biāo)志著dbwn要寫。在其它進(jìn)程在執(zhí)行dbwn異步的寫臟數(shù)據(jù)到緩存中,
  • DBW n periodically writes buffers to advance the checkpoint , which is the position in the redo thread (log) from which instance recovery begins. This log position is determined by the oldest dirty buffer in the buffer cache.

  • dbwn定期的寫緩存數(shù)據(jù),為了使檢查點(diǎn)向前。在高速緩存中重做位置是由最后臟緩存決定的。

四、LGWR

LGWR(日志寫入程序)進(jìn)程負(fù)責(zé)把聯(lián)機(jī)重做日志緩沖區(qū)的內(nèi)容寫入聯(lián)機(jī)重做日志文件。

觸發(fā)LGWR的條件:

A commit record when a user process commits a transaction

當(dāng)用戶進(jìn)程提交一個(gè)事務(wù)Redo log buffers

Every three seconds超過三分鐘

When the redo log buffer is one-third full

當(dāng)重寫緩存達(dá)到三分之一時(shí).

When a DBW n process writes modified buffers to disk, if necessary

當(dāng)dbwn進(jìn)程寫臟緩存到硬盤.

The log writer process (LGWR) is responsible for redo log buffer management—writing the redo log buffer to a redo log file on disk. LGWR writes all redo entries that have been copied into the buffer since the last time it wrote.

LGWR對(duì)重做日志緩存負(fù)責(zé)-------寫重做日志緩存到重做日志文件中.LGWR寫所有的重做記錄,是為了在最后把緩存里的東西復(fù)制出來.

The redo log buffer is a circular buffer. When LGWR writes redo entries from the redo log buffer to a redo log file, server processes can then copy new entries over the entries in the redo log buffer that have been written to disk. LGWR normally writes fast enough to ensure that space is always available in the buffer for new entries, even when access to the redo log is heavy.

重做日志緩存區(qū)是一循環(huán)的緩存區(qū).當(dāng)LGWR把重做記錄從重做日志緩存區(qū)寫到重做日志文件中.在重做日志緩存服務(wù)進(jìn)程能把新的記錄復(fù)制到這個(gè)記錄上,舊的記錄被寫到硬盤上.

LGWR一般都快速的寫以確保在緩存中對(duì)于新存的記錄能有空閑的空間可以使用,即使當(dāng)redo log很忙.

LGWR writes synchronously to the active mirrored group of redo log files. If one of the files in the group is damaged or unavailable, LGWR continues writing to other files in the group and logs an error in the LGWR trace file and in the system alert log. If all files in a group are damaged, or the group is unavailable because it has not been archived, LGWR cannot continue to function.

LGWR同步的寫活動(dòng)反映到重做日志文件的組中.如果在一個(gè)組里只有一個(gè)文件是的危害的和不可用的.在組LGWR繼續(xù)寫其它文件和日志在LGWR跟蹤文件中有是有錯(cuò)誤的,在系統(tǒng)的警告日志.如果所有的文件在一個(gè)組里是危險(xiǎn)的.或組不可用的因?yàn)橐驗(yàn)樗荒鼙淮鏅n,LGWR功能不能被繼續(xù)使用.



11.20號(hào)------oracle background process(后臺(tái)進(jìn)程)


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 精品久久久久久久久久久久久久久 | 亚洲精品动漫3d一区二区 | 亚洲国产精品久久 | 精品视频一二三区 | 久久成人免费观看全部免费 | 日本综合在线 | 不一样的天空在线高清观看 | 久久伊人一区二区三区四区 | 四虎午夜| 国产a v高清一区二区三区 | 免费看欧美一级特黄a大片一 | 四虎网址在线 | 亚洲欧洲一区二区三区久久 | 日韩高清中文字幕 | 一级aa 毛片高清免费看 | 女人十八一级毛片 | 日韩在线视频www色 日韩在线视频不卡 | 亚洲精品福利一区二区三区 | 亚洲欧美一 | 婷婷在线视频观看 | 国产 高清 在线 | 国产精品香蕉在线观看不卡 | 99热精品在线免费观看 | 国产精品一区二区在线播放 | 伊人久久中文字幕久久cm | 四虎国产永久在线观看 | 精品一区二区三区三区 | 久久久久久久国产视频 | 中文字幕欧美亚洲 | 日本一级在线播放线观看免 | 不卡的毛片 | 国内精品一级毛片免费看 | 五月婷在线 | 天天躁日日躁aaaaxxxx | 天天插天天干天天射 | 久久做| 午夜亚洲精品久久久久久 | 激情四播 | 亚洲国产日产韩国欧美综合 | 毛片91 | 99国产精品久久久久久久日本 |