Knowledge increases exponentially. Today, you probably own more books than great universities of times past—Cambridge University owned less than two hundred books in the fifteenth century. First came the invention of writing, then alphabets, then paper, then the printing press, then mechanization. Each step caused an exponential increase in the collective human knowledge. In our generation, Al Gore invented the internet and the last barriers to the spread of knowledge have been broken. Today, everybody has the ability to contribute, communicate, and collaborate. We are all caught up in a tsunami, an avalanche, a conflagration, a veritable explosion of knowledge for the betterment of humankind. This is the blog of the good folks at Database Specialists, a brave band of Oracle database administrators from the great state of California. We bid you greeting, traveler. We hope you find something of value on these pages and we wish you good fortune in your journey.

How Does RMAN Compression Affect Recovery Time?

In my previous blog post “RMAN Compression Algorithms in 11gR2”, I explained the different compression options and did some testing to determine how RMAN compression affects the time it takes to do a backup. As a follow-up to that, I wanted to find out how RMAN compression will affect recovery time.

For this test, I created about 19GB worth of data in the USERS tablespace, did a backup using each of the 5 available compression algorithms (including NONE) and then did a restore using each of the 5 backups. I ran through the test a couple of times to make sure the timings were consistent.

Test script:

CONFIGURE COMPRESSION ALGORITHM 'BASIC';
backup as compressed backupset database format '/tmp/basic/db%U.dbf' tag ‘basic’;
CONFIGURE COMPRESSION ALGORITHM 'LOW';
backup as compressed backupset database format '/tmp/basic/db%U.dbf' tag ‘low’;
CONFIGURE COMPRESSION ALGORITHM 'MEDIUM';
backup as compressed backupset database format '/tmp/basic/db%U.dbf' tag ‘medium’;
CONFIGURE COMPRESSION ALGORITHM 'HIGH';
backup as compressed backupset database format '/tmp/high/db%U.dbf' tag ‘high’;
CONFIGURE COMPRESSION ALGORITHM 'NONE';
backup database format '/tmp/none/db%U.dbf' tag ‘none’
sql “alter tablespace USERS offline”;
host “rm users01.dbf”;
restore tablespace USERS from tag ‘basic’;
host “rm users01.dbf”;
restore tablespace USERS from tag ‘low’;
host “rm users01.dbf”;
restore tablespace USERS from tag ‘medium’;
host “rm users01.dbf”;
restore tablespace USERS from tag ‘high’;
host “rm users01.dbf”;
restore tablespace USERS from tag ‘none’

Test Results:

Compression Type Backup Size (GB) Time to Backup (minutes) Time to Restore (minutes)
BASIC 2.9 13 14
LOW 4.1 7 7
MEDIUM 3.3 9 7
HIGH 2.2 88 16
NONE 20 12 10

Interestingly, the time to restore is pretty close to the backup time except in the case of HIGH compression where it took 88 minutes to backup and only 16 minutes to restore. The overall quickest way to backup and recover is to use LOW compression but the BASIC option still looks pretty good considering it is the one that doesn’t cost any extra. However, if you have a strict recovery SLA then using either LOW or MEDIUM may be worth the cost in order to minimize downtime.

My initial assumption was that RMAN compression would add processing time to both backup and recovery operations and would therefore be slower. In this case, that turned out not to be true; using compression makes them go faster. With a different mix of data and hardware, you could certainly get different results and I encourage you to try it out. I would be interested to hear your findings.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>