RMAN深入解析之--內(nèi)存中的RMAN
在確山等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè) 網(wǎng)站設(shè)計(jì)制作按需開發(fā),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),高端網(wǎng)站設(shè)計(jì),營銷型網(wǎng)站,外貿(mào)網(wǎng)站制作,確山網(wǎng)站建設(shè)費(fèi)用合理。
RMAN會(huì)在內(nèi)存中創(chuàng)建一些緩沖區(qū),然后通過這些緩沖區(qū)將數(shù)據(jù)塊 寫入到備份中。內(nèi)存的利用與PGA(有時(shí)是SGA)的總體大小有關(guān)。
內(nèi)存緩沖區(qū)分為輸入緩沖區(qū)和輸出緩沖區(qū)。輸入緩沖區(qū)(input buffer)填充從備份文件中讀取數(shù)據(jù)塊;輸出緩沖區(qū)(output buffer)則在執(zhí)行內(nèi)存對(duì)內(nèi)存的寫操作時(shí)填充需要備份的數(shù)據(jù)塊,一旦輸出緩沖區(qū)被填滿,輸出緩沖區(qū)的內(nèi)容就會(huì)被寫入到備份位置。
RMAN的內(nèi)存利用
在磁盤上備份會(huì)使用PGA內(nèi)存空間作為備份緩沖區(qū),PGA內(nèi)存空間從用于信道進(jìn)程的內(nèi)存空間中分配。如果操作系統(tǒng)沒有配置本地異步I/O,則可以利用DBWR_IO_SLAVES參數(shù)使用I/O叢屬來填充內(nèi)存中的輸入緩沖。如果設(shè)置DBWR_IO_SLAVES參數(shù)為任意的非零值,則RMAN會(huì)自動(dòng)分配4個(gè)I/O從屬來協(xié)調(diào)輸入緩沖區(qū)中數(shù)據(jù)塊加載。為了實(shí)現(xiàn)這一功能,RMAN必須利用一個(gè)共享內(nèi)存區(qū)域。因此,用于磁盤備份的內(nèi)存緩沖區(qū)會(huì)被推入共享池,如果存在大池,則被推入大池。如果沒有使用磁帶I/O從屬,則會(huì)在PGA中分配用于磁帶輸出緩沖區(qū)的內(nèi)存。
查看RMAN備份輸入緩沖區(qū)的信息:
[oracle@rh7 ~]$ rman target / Recovery Manager: Release 11.2.0.1.0 - Production on Tue Jun 17 18:30:27 2014 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. connected to target database: PROD (DBID=239333010) RMAN> backup database; Starting backup at 17-JUN-14 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=43 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00001 name=/u01/app/oracle/oradata/prod/system01.dbf input datafile file number=00002 name=/u01/app/oracle/oradata/prod/sysaux01.dbf input datafile file number=00005 name=/u01/app/oracle/oradata/prod/example01.dbf input datafile file number=00003 name=/u01/app/oracle/oradata/prod/undotbs01.dbf input datafile file number=00004 name=/u01/app/oracle/oradata/prod/users01.dbf channel ORA_DISK_1: starting piece 1 at 17-JUN-14 channel ORA_DISK_1: finished piece 1 at 17-JUN-14 piece handle=/u01/app/oracle/product/11.2.0/db_1/dbs/04pb386s_1_1 tag=TAG20140617T183051 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:42 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set including current control file in backup set including current SPFILE in backup set channel ORA_DISK_1: starting piece 1 at 17-JUN-14 channel ORA_DISK_1: finished piece 1 at 17-JUN-14 piece handle=/u01/app/oracle/product/11.2.0/db_1/dbs/05pb38a3_1_1 tag=TAG20140617T183051 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 17-JUN-14 查看緩沖區(qū)信息: sql>select set_count,device_type,type,filename,buffer_size,buffer_count,open_time,close_time 2 from v$backup_async_io 3* order by set_count,type,open_time,close_time SET_COUNT DEVICE_TYP TYPE FILENAME BUFFER_SIZE BUFFER_COUNT OPEN_TIME CLOSE_TIM ---------- ---------- --------- ---------------------------------------- ----------- ------------ --------- --------- 4 DISK AGGREGATE 0 0 17-JUN-14 17-JUN-14 4 DISK INPUT /u01/app/oracle/oradata/prod/example01.d 524288 6 17-JUN-14 17-JUN-14 bf 4 DISK INPUT /u01/app/oracle/oradata/prod/sysaux01.db 524288 6 17-JUN-14 17-JUN-14 f 4 DISK INPUT /u01/app/oracle/oradata/prod/system01.db 524288 6 17-JUN-14 f 4 DISK INPUT /u01/app/oracle/oradata/prod/users01.dbf 524288 6 17-JUN-14 17-JUN-14 4 DISK INPUT /u01/app/oracle/oradata/prod/undotbs01.d 524288 6 17-JUN-14 17-JUN-14 bf 4 DISK OUTPUT /u01/app/oracle/product/11.2.0/db_1/dbs/ 1048576 4 17-JUN-14 04pb386s_1_1 7 rows selected. Elapsed: 00:00:00.02 18:32:19 SYS@ prod>