Comparing of RMAN Backup Compression Levels

Hi Friends,

There are different compression levels with Oracle 11g R2. BASIC, LOW, MEDIUM and HIGH are the four different compression levels. We must have “Advanced Compression” option license to use LOW, MEDIUM and HIGH levels of compression. In this article, I will do the tests at 4 compression levels. We will compare compression levels for backup duration and backup size.

So let’s just our test.

I wrote a shell script like the following. Thus, you can watch your spare time.

# vi rman_compression_test.sh

Add following lines to rman_compression_test.sh script and save it.

echo “RMAN Backup Start Date :” `date ‘+%d.%m.%Y %H:%M:%S’`

StartTime=$(date +%s)

export NLS_LANG=AMERICAN export NLS_DATE_FORMAT=’DD-MON-YYYY HH24:MI:SS’

rman target / << EOSQL

backup as compressed backupset database;

EOSQL

EndTime=$(date +%s)

DiffTime=$(( $EndTime – $StartTime ))

echo “RMAN Backup Finished.”

echo “Backup End Date :” `date ‘+%d.%m.%Y %H:%M:%S’`

echo “RMAN Backup Duration :” $DiffTime

Let us set the location of our backup files.

# rman target /

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT ‘/oracle/yedek/bck_test11g/%U’;

1- BASIC compression level test. let’s see our recent compression level.

# rman target /

RMAN> SHOW COMPRESSION ALGORITHM ;

RMAN configuration parameters for database with db_unique_name DBARGE are:

CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE;

We are using BASIC level. Now let’s back up  of our 10GB database as compressed.

# . rman_compression_test.sh

RMAN Backup Start Date : 13.03.2012 16:19:33

…..

Recovery Manager complete.

RMAN Backup Finished.

Backup End Date : 13.03.2012 16:26:32

RMAN Backup Duration : 419

The load average was during the backup:

# top load average: 1.12, 0.82, 0.75

Backup Size: 636M

2- LOW compression level test.

# rman target /

RMAN> CONFIGURE COMPRESSION ALGORITHM ‘LOW’;

old RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM ‘LOW’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters are successfully stored

Now we are using the LOW level. let’s start backup.

# . rman_compression_test.sh

RMAN Backup Start Date : 13.03.2012 16:30:36

…..

Recovery Manager complete.

RMAN Backup Finished.

Backup End Date : 13.03.2012 16:33:45 RMAN

Backup Duration : 189

The load average was during the backup:

# top load average: 1.34, 0.85, 0.74

Backup Size: 797M

3- MEDIUM compression level test.

# rman target /

RMAN> CONFIGURE COMPRESSION ALGORITHM ‘MEDIUM’;

old RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM ‘LOW’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM ‘MEDIUM’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters are successfully stored

Now we are using the MEDIUM level. let’s start backup.

# . rman_compression_test.sh

RMAN Backup Start Date : 13.03.2012 16:36:21

…..

Recovery Manager complete.

RMAN Backup Finished.

Backup End Date : 13.03.2012 16:40:19

RMAN Backup Duration : 238

The load average was during the backup:

# top load average: 1.38, 0.93, 0.77

Backup Size: 674M

4- HIGH compression level test.

# rman target /

RMAN> CONFIGURE COMPRESSION ALGORITHM ‘HIGH’;

old RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM ‘MEDIUM’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM ‘HIGH’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters are successfully stored

Now we are using the HIGH level. let’s start backup.

# . rman_compression_test.sh

RMAN Backup Start Date : 13.03.2012 16:42:21

…..

Recovery Manager complete.

RMAN Backup Finished.

Backup End Date : 13.03.2012 17:34:30

RMAN Backup Duration : 3129

The load average was during the backup:

# top load average: 1.20, 1.07, 0.88

Backup Size: 485M

5- Normal backup test. Change content of our rman_compression_test.sh script with following lines

# vi rman_compression_test.sh

echo “RMAN Backup Start Date :” `date ‘+%d.%m.%Y %H:%M:%S’`

StartTime=$(date +%s)

export NLS_LANG=AMERICAN export NLS_DATE_FORMAT=’DD-MON-YYYY HH24:MI:SS’

rman target / << EOSQL

backup as backupset database;

EOSQL

EndTime=$(date +%s)

DiffTime=$(( $EndTime – $StartTime ))

echo “RMAN Backup Finished.”

echo “Backup End Date :” `date ‘+%d.%m.%Y %H:%M:%S’`

echo “RMAN Backup Duration :” $DiffTime

Execute script.

#. rman_compression_test.sh

RMAN Backup Start Date : 13.03.2012 17:37:51

…..

Recovery Manager complete.

RMAN Backup Finished.

Backup End Date : 13.03.2012 17:42:30

RMAN Backup Duration : 279

The load average was during the backup:

# top load average: 2.42, 1.56, 1.17

Backup Size: 4.0G

Compression Level Backup Size Backup Duration
NORMAL 4.0G 279 sec
BASIC 636M 419 sec
LOW 797M 189 sec
MEDIUM 674M 238 sec
HIGH 485M 3129 sec
Advertisement

2 thoughts on “Comparing of RMAN Backup Compression Levels

  1. sarfraz

    Very nice test and analysis. I was wondering have you attempted the same series of tests with “OPTIMIZE FOR LOAD FALSE” to enable the precompression block processing. I’d be interested to see how this setting impacts load, backup size and duration under the same conditions.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s