Oracle rman优化参数,使用RMAN多通道进行压缩优化

使用RMAN多通道进行压缩优化

在很多时候我们需要对备份进行压缩,如果我们能分配多个通道,那么每个通道对应的服务器进程可以分别在多个CPU上执行

从而达到一个很好的并行,但是分配多个并行通道时需要注意在读取或写出块的时候对io的影响,所以尽量使用rate 来对io进行限

定,例

run

{

allocate channel c1 device type disk rate 200M;

backup as  compressed backupset database format '/bak/test/%U';

release channel c1;

}

channel c1: starting piece 1 at 04-AUG-13

channel c1: finished piece 1 at 04-AUG-13

piece handle=/u01/app/oracle/product/11.1.7/db_1/dbs/02ogdt0m_1_1 tag=TAG20130804T030806 comment=NONE

channel c1: backup set complete, elapsed time: 00:55:26

load average: 1.12, 1.08, 0.74

很容易发现这个备份过程主要在compress阶段花费的时间是最长的,因为只有一个通道在运行,所以就算有服务器有再多的cpu,其他的都是处

于空闲状态,只能是一个通道把一个cpu跑满.在一个32cpu的服务器上,负载一直在1多一点,证明只有一个cpu在跑.多cpu的处理能力没有发挥出来.

通过分配多个通道,总的io还是原来的大小,限定的主要原因是防止多个通道把io能力都吃掉.这样可以把通道进程分配在多个cpu上运行,

从而使压缩的过程快速完成

run

{

allocate channel c1 device type disk rate 20M;

allocate channel c2 device type disk rate 20M;

allocate channel c3 device type disk rate 20M;

allocate channel c4 device type disk rate 20M;

allocate channel c5 device type disk rate 20M;

allocate channel c6 device type disk rate 20M;

allocate channel c7 device type disk rate 20M;

allocate channel c8 device type disk rate 20M;

allocate channel c9 device type disk rate 20M;

allocate channel c10 device type disk rate 20M;

backup as  compressed backupset database;

release channel c1;

release channel c2;

release channel c3;

release channel c4;

release channel c5;

release channel c6;

release channel c7;

release channel c8;

release channel c9;

release channel c10;

}

piece handle=/u01/app/oracle/product/11.1.7/db_1/dbs/04oge0an_1_1 tag=TAG20130804T040438 comment=NONE

channel c1: backup set complete, elapsed time: 00:25:57

channel c1: throttle time: 0:00:02

Finished backup at 04-AUG-13

load average: 4.90, 5.34, 3.37

可以看到最长的完成花费时间是25:57.主机负载也上来了。由于没有指定哪个通道备份哪些文件,有时候可能会还存在一

些不平衡,通过指定某个通道备份哪些文件可以达到更好的平衡.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值