Enabling Redo Log Transport Compression

Redo Log Transport Compression feature was added in Oracle 11gR1 primarily for quickly resolving the archive log gap. Seeing the scope of setting this parameter, Oracle has documented hidden parameter _REDO_TRANSPORT_COMPRESS_ALL, which can be used to enable compression for ASYNC/MaxPerformance redo transport (surely it will extend to MaxProtection, MaxAvailability)
 

Before using this hidden parameter, we need to check if the Advanced Compression is enabled

SQL> select * from v$option where parameter ='Advanced Compression';
PARAMETER             VALUE
--------------------- ------
Advanced Compression  TRUE

Then set the hidden parameter. This cannot be modified on-the-fly.

SQL> alter system set "_REDO_TRANSPORT_COMPRESS_ALL"=TRUE SCOPE=SPFILE;
System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORACLE instance started.
Total System Global Area 1.0289E+10 bytes
Fixed Size                  2233048 bytes
Variable Size            5268049192 bytes
Database Buffers         4999610368 bytes
Redo Buffers               18722816 bytes
Database mounted.
Database opened.

SQL> show parameter COMPRESS
NAME                                 TYPE        VALUE
------------------------------------ ----------- -------
_redo_transport_compress_all         boolean     TRUE

Then to enable compression, set the compression attribute of the redo transport destination to enable.

SQL> alter system set  log_archive_dest_2 = 
"service=TARGET valid_for=(online_logfiles,primary_role) 
compression=enable db_unique_name=STDBY";

OR

DGMGRL> edit database 'STDBY' set property 'RedoCompression' = enable;

 

So how much compression ratio we should expect?

Data Guard redo transport compression uses the zlib compression engine at level 1 (which is equivalent of gzip -1 level). I tried compressing one of the archive log files.

$ gzip -1 arch1_100_737324718.dbf

Then used the gzip –list option to check the compression ratio

$ gzip --list  arch1_100_737324718.dbf.gz
         compressed        uncompressed  ratio uncompressed_name
             257317             1167360  78.0% arch1_100_737324718.dbf

Almost 80% less bandwidth usage. That’s quite amazing!!

Advertisements
This entry was posted in Oracle Data Guard and tagged . Bookmark the permalink.

4 Responses to Enabling Redo Log Transport Compression

  1. Monex says:

    Compression of redo traffic over the network in a Data Guard configuration This feature improves redo transport performance when resolving redo gaps by compressing redo before it is transmitted over the network..

  2. Absolutely correct. Specifically, in the setup’s where bandwidth is a constraint, it helps a lot.

  3. Compression of redo traffic over the network in a Data Guard configuration This feature improves redo transport performance when resolving redo gaps by compressing redo before it is transmitted over the network..

  4. Compression of redo traffic over the network in a Data Guard configuration This feature improves redo transport performance when resolving redo gaps by compressing redo before it is transmitted over the network..

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s