重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
RMAN深入解析之--内存中的RMAN
创新互联建站专注于网站建设|成都网站改版|优化|托管以及网络推广,积累了大量的网站设计与制作经验,为许多企业提供了网站定制设计服务,案例作品覆盖酒楼设计等行业。能根据企业所处的行业与销售的产品,结合品牌形象的塑造,量身开发品质网站。RMAN会在内存中创建一些缓冲区,然后通过这些缓冲区将数据块 写入到备份中。内存的利用与PGA(有时是SGA)的总体大小有关。
内存缓冲区分为输入缓冲区和输出缓冲区。输入缓冲区(input buffer)填充从备份文件中读取数据块;输出缓冲区(output buffer)则在执行内存对内存的写操作时填充需要备份的数据块,一旦输出缓冲区被填满,输出缓冲区的内容就会被写入到备份位置。
RMAN的内存利用
在磁盘上备份会使用PGA内存空间作为备份缓冲区,PGA内存空间从用于信道进程的内存空间中分配。如果操作系统没有配置本地异步I/O,则可以利用DBWR_IO_SLAVES参数使用I/O丛属来填充内存中的输入缓冲。如果设置DBWR_IO_SLAVES参数为任意的非零值,则RMAN会自动分配4个I/O从属来协调输入缓冲区中数据块加载。为了实现这一功能,RMAN必须利用一个共享内存区域。因此,用于磁盘备份的内存缓冲区会被推入共享池,如果存在大池,则被推入大池。如果没有使用磁带I/O从属,则会在PGA中分配用于磁带输出缓冲区的内存。
查看RMAN备份输入缓冲区的信息:
[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 查看缓冲区信息: 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>另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。