Oracle GoldenGate has supported data compression at the network layer for many years, enhancing data transfer rates. Compression techniques often improve performance, given the reduction in data that needs to be transferred from source to target. When configured in the Extract or data pump process parameter file, the server collector process on the target machine automatically decompresses the data before writing to the remote trail files.
Depending on your data, the maximum compression ratio can exceed 5:1, which will help transfer speeds on low bandwidth networks. However, additional CPU utilization is required when compared to no data compression, which is the default.
If compression is enabled, the following statistics are available in the Extract process report, which is obtained via the GGSCI
SEND
command with the GETTCPSTATS
argument:
The following code shows the TCP/IP statistics from the GGSCI command:
GGSCI (db12server01) 1> send EXTRACT EPMP01, gettcpstats Sending GETTCPSTATS request to EXTRACT EPMP01 ... RMTTRAIL ./dirdat/rt000019, RBA 7566 OK Session Index 0 Stats started 2015/04/04 16:39:04.904202 0:39:54.613860 Local address 192.168.56.101:36106 Remote address 192.168.56.102:7819 Buffer Size 27985 Flush Size 27985 SND Size 27985 Streaming Yes Inbound Msgs 273 Bytes 4399, 1 bytes/second Outbound Msgs 2658 Bytes 135135, 56 bytes/second Recvs 546 Sends 2658 Avg bytes per recv 8, per msg 16 Avg bytes per send 50, per msg 50 Recv Wait Time 2543402, per msg 9316, per recv 4658 Send Wait Time 266907, per msg 100, per send 100 Data compression is enabled Compress CPU Time 0:00:00.000000 Compress time 0:00:00.000018, Threshold 2048 Uncompressed bytes 6104 Compressed bytes 1104, 339111111 bytes/second
The following example data pump process parameter file has the COMPRESS
option configured:
EXTRACT EPMP01 PASSTHRU RMTHOST db12server02, MGRPORT 7809, COMPRESS, COMPRESSTHRESHOLD 2048 RMTTRAIL ./dirdat/ta
The additional associated COMPRESSTHRESHOLD
parameter specifies the minimum number of bytes in a block at which compression occurs. The default is 1000 bytes.
The block size can be derived from the report generated by the following GGSCI
INFO
command in the Write Checkpoint
section:
GGSCI (db12server01) 1> INFO EPMP01, SHOWCH .. Write Checkpoint #1 GGS Log Trail Current Checkpoint (current write position): Sequence #: 17 RBA: 7775 Timestamp: 2015-04-04 16:34:03.415222 Extract Trail: ./dirdat/rt Trail Type: RMTTRAIL Header: Version = 2 Record Source = A Type = 1 # Input Checkpoints = 1 # Output Checkpoints = 1 File Information: Block Size = 2048 Max Blocks = 100 Record Length = 2048 Current Offset = 0 Configuration: Data Source = 0 Transaction Integrity = 1 Task Type = 0 Status: Start Time = 2015-04-04 16:27:26 Last Update Time = 2015-04-04 16:34:03 Stop Status = A Last Result = 400
The SHOWCH
argument of the INFO
command displays the checkpoint information. Here, we see it is 2048
bytes that is configured for the Extract EPMP01
process to compress the whole block in the preceding example.
Compressed tables have been supported since Oracle GoldenGate 11g Release 2 Version 11.2.x. Data compression works for all data types except all variants of LOBs and data types derived from LOBs, such as VARRAYs stored out of line or the XML data types stored in a CLOB (Character Large Object). Furthermore, compression is disabled for tables with more than 255 columns.
Note that the feature requires the Extract process to be configured in integrated capture mode in order to enable database metadata look ups during data processing. Once configured, GoldenGate will support the following compression types:
3.144.161.116