Difference between revisions of "Rman backup: compression"

From Robs_Wiki
Jump to: navigation, search
(How to perform a compressed backup)
(Introduction)
 
Line 1: Line 1:
 
__TOC__
 
__TOC__
 
== Introduction ==
 
== Introduction ==
There are 4 levels of compression for rman: BASIC, LOW, MEDIUM and HIGH. BASIC is free and the others require the "Advanced Compression" license.
+
* WHen you compress backups you can use RMAN to do the compression.
 +
* There are 4 levels of compression for rman: BASIC, LOW, MEDIUM and HIGH. BASIC is free and the others require the "Advanced Compression" license. This will explained here.
 +
* '''However, it is much better to enable compression at the storage level''', for example when you use a ZFS Storage Appliance. You get roughly the same compression ratio, but the compression occurs at the storage tier, saving precious cpu cycles on the database tier.
  
 
== How to configure backup compression ==
 
== How to configure backup compression ==

Latest revision as of 12:07, 28 January 2020

Introduction

  • WHen you compress backups you can use RMAN to do the compression.
  • There are 4 levels of compression for rman: BASIC, LOW, MEDIUM and HIGH. BASIC is free and the others require the "Advanced Compression" license. This will explained here.
  • However, it is much better to enable compression at the storage level, for example when you use a ZFS Storage Appliance. You get roughly the same compression ratio, but the compression occurs at the storage tier, saving precious cpu cycles on the database tier.

How to configure backup compression

You can find out the current setting with the statement below:

RMAN> show compression algorithm;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name PRDDB are:
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

You can change this configuration as follows:

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

How to perform a compressed backup

You use the same statement for any of the 4 backup settings. The statement simply applies the type of compression that is configured:

RMAN> backup as compressed backupset database plus archivelogs delete input;

Backup figures

The backup sizing and performance depends per system. So you will have to do some reseach yourself. But see below some info I got from another website. It turns out that the BASIC compression is not too bad,

Compression level	Backup Size	Backup Duration
=======================================================
NORMAL     		4 GB		279 sec
BASIC			636 MB		419 sec
LOW			797 MB		189 sec
MEDIUM			674 MB		238 sec
HIGH			485 MB		3129 sec