Friday, August 15, 2008

Compressed Oracle Backup can be faster than Uncompressed

I ran a quick test to compare runtime and size of compressed and uncompressed backups.

RUN {
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/backup/rman_%d_%T_%s_%p';
BACKUP DATABASE;
}

RUN {
ALLOCATE CHANNEL disk1 DEVICE TYPE DISK FORMAT '/backup/rman_%d_%T_%s_%p';
BACKUP as compressed backupset DATABASE;
}

File Type File_Size Backup _Time
Datafile on disk 47.6GB
Uncompressed Backup 17.1GB 25 minutes 25 seconds
Compressed Backup 3.0GB 16 minutes 26 seconds

For this test the compressed backup size was only 6% of the uncompressed datafiles, and 17% of the uncompressed backup.
Runtime for compressed backup was only 65% of runtime for uncompressed backup.

The compression ratio, and runtime will vary depending on database size, data density, and IO throughput. I have had similar improvements using Tape backup.

This means that compressed rman backup can :-
1. save significant tape space
2. reduce backup times
3. reduce backup failures.
4. reduce disk space needed for archivelogs
5. speed up refreshes of DEV environments