全部博文(389)
分类: Oracle
2013-08-06 17:06:30
使用RMAN多通道进行compress resotre优化
在之前的blog中我提到可以使用rman的多通道进行compress 备份,相应的在restore期间也可以使用多个通道,这样每个通道进程会被os放到不同的cpu上运行
从而加快restore过程,特别是在compress 的restore时候,这时候uncompress占用了很大一部分时间,使用多通道加速恢复的过程
run
{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
allocate channel c3 device type disk;
allocate channel c4 device type disk;
allocate channel c5 device type disk;
set until sequence 26747 thread 1;
set until sequence 13743 thread 2;
restore database;
recover database;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
release channel c5;
}
试图分配五个通道进行restore,看结果
channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup
XXXXXXXXXXXX
channel c1: reading from backup piece XXXXXXXXXXX
channel c2: starting datafile backup set restore
XXXXXXXXXXXXX
channel c2: reading from backup piece XXXXXXXXXX
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
XXXXXXXXXXXXXX
channel c3: reading from backup piece XXXXXXXXXXX
从输出中可以看出,rman 只使用了三个通道。这是为什么呢?原因是RMAN在进行restore的时候,只能是每个通道读一个backuppiece,虽然分配了五个道通,但实际上是三个通道在进行
restore操作,再然后就是在备份的时候,根据io能力,可以适当设置每个piece大小,形成多个piece,这样在resotre的时候可以使用多通道来加速,,再然后.......就没有了...............