rman实验——测试备份压缩

oracle rman自带的备份压缩机制,可以有效的压缩备份的大小,降低磁盘的占用率。但是也会因为压缩而消耗更多的系统性能,和增加备份时间。现在就通过实验来看压缩和不压缩的区别。

进行不压缩全备

RMAN> backup  database format '/RmanBackup/full_%d_%T_%s_%p.DBFILE';

...
通道 ORA_DISK_1: 备份集完成, 用时: 00:01:55
... 通道 ORA_DISK_1: 备份集完成, 用时: 00:01:05
... 通道 ORA_DISK_1: 备份集完成, 用时: 00:00:0322-11月-18 完成了 backup
                                              //总用时3分03s

查看系统负载

[root@jydb1 ~]# while : ;do echo `w | head -1`; sleep 4; done;
...
15:04:41 up 13 days, 3:57, 3 users, load average: 3.01, 1.97, 1.43
15:04:45 up 13 days, 3:57, 3 users, load average: 3.09, 2.00, 1.44
15:04:49 up 13 days, 3:57, 3 users, load average: 3.09, 2.00, 1.44         //负载最高是达到3.09
15:04:53 up 13 days, 3:57, 3 users, load average: 3.08, 2.02, 1.45
15:04:57 up 13 days, 3:57, 3 users, load average: 2.91, 2.00, 1.45
15:05:01 up 13 days, 3:57, 3 users, load average: 2.76, 1.99, 1.44
...

备份文件大小为

[root@jydb1 ~]# ls -lht /RmanBackup/
                                              //总用量 4.4G
-rw-r----- 1 oracle asmadmin  20M 11月 22 15:05 full_ORCL_20181122_128_1.DBFILE
-rw-r----- 1 oracle asmadmin 394M 11月 22 15:05 full_ORCL_20181122_127_1.DBFILE
-rw-r----- 1 oracle asmadmin 1.3G 11月 22 15:04 full_ORCL_20181122_126_1.DBFILE
-rw-r----- 1 oracle asmadmin 2.7G 11月 22 15:03 full_ORCL_20181122_125_1.DBFILE

进行压缩方式全备

RMAN> backup as compressed backupset database format '/RmanBackup/full_compressed_%d_%T_%s_%p.DBFILE';

...
通道 ORA_DISK_1: 备份集完成, 用时: 00:02:25...
通道 ORA_DISK_1: 备份集完成, 用时: 00:01:25...
通道 ORA_DISK_1: 备份集完成, 用时: 00:00:35...
通道 ORA_DISK_1: 备份集完成, 用时: 00:00:0322-11月-18 完成了 backup
                                              //总用时4分25s

查看系统负载

[root@jydb1 ~]# while : ;do echo `w | head -1`; sleep 4; done;
...
16
:08:09 up 13 days, 5:00, 3 users, load average: 2.07, 1.78, 1.80 16:08:13 up 13 days, 5:00, 3 users, load average: 2.06, 1.78, 1.80 16:08:17 up 13 days, 5:01, 3 users, load average: 2.22, 1.82, 1.81 16:08:21 up 13 days, 5:01, 3 users, load average: 2.28, 1.84, 1.82    //负载最高是达到2.28 16:08:25 up 13 days, 5:01, 3 users, load average: 2.18, 1.82, 1.81 16:08:29 up 13 days, 5:01, 3 users, load average: 2.18, 1.82, 1.81 16:08:33 up 13 days, 5:01, 3 users, load average: 2.08, 1.81, 1.81

备份文件大小为

[root@jydb1 ~]# ls -lht /RmanBackup/
                                              //总用量 964M
-rw-r----- 1 oracle asmadmin 1.2M 11月 22 16:08 full_compressed_ORCL_20181122_132_1.DBFILE
-rw-r----- 1 oracle asmadmin 104M 11月 22 16:07 full_compressed_ORCL_20181122_131_1.DBFILE
-rw-r----- 1 oracle asmadmin 309M 11月 22 16:07 full_compressed_ORCL_20181122_130_1.DBFILE
-rw-r----- 1 oracle asmadmin 512M 11月 22 16:06 full_compressed_ORCL_20181122_129_1.DBFILE

 

总结

使用rman备份压缩,和之前预想的一样

不压缩和压缩备份大小比:6:1

不压缩和压缩备份时间比:183分:265分     大概1:1.45

系统负载:没有很大变化

 

posted @ 2018-11-26 10:27  abm  阅读(1587)  评论(0编辑  收藏  举报