Db2 for z/OS and its ecosystem

Db2 for z/OS and its ecosystem

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only

Optimizing Db2 replication with CDDS enhancements in Db2 13 for z/OS

By Ping Wang posted 19 hours ago

  

By Ping Wang and Lingyun Wang

With the enhancement provided in PH64099, available in both data sharing and non-data sharing systems on Db2 13 function level 500 or higher, Db2 for z/OS now supports utilizing the compression dictionary data set (CDDS) to store expansion dictionaries for compressed table spaces. Previously exclusive to GDPS Continuous Availability with zero data loss environments, CDDS storage of dictionaries is now available more broadly, significantly improving replication performance and reducing serialization overhead.

Before this APAR, applications leveraging replication through IFI READS calls for IFCID 306 or IBM integrated Synchronization might have experienced performance hits when accessing compressed logs. Reading log records for a compressed table space for replication purposes requires access to the expansion dictionary associated with the table space. Performance degradation and serialization issues may occur when accessing the expansion dictionary within the compressed table space or retrieving it from a log data set, especially when it's in an archive log on tape.

What’s New with APAR PH64099?

A key addition in this update is the new CDDS_MODE subsystem parameter value, SOURCE_ONLY, allowing non-GDPS environments to leverage the CDDS efficiently.

When the enhancement provided by APAR PH64099 is enabled, Db2 stores expansion dictionaries in the CDDS, avoiding the need to fetch these dictionaries from table spaces or archived logs when decompressing a log record.

Key Benefits Include

Enhanced Performance: Avoids the need to open page sets or access archived logs for log record decompression, reducing CPU usage. Reducing CPU consumption and potentially avoiding group bufferpool dependency in data sharing environments
Reduced Serialization Issues: Avoids acquiring DBD locks and claims on page sets, reducing interference with concurrent DDL and utility operations.
Simplified Maintenance: Easy population and management of expansion dictionaries in the CDDS via Db2 utilities.

Utility and Command Changes

Several utilities and commands have been enhanced to support this new functionality:

- REORG utility enhancements: REORG inserts expansion dictionaries into the CDDS when reorganizing compressed table spaces defined for CDC (Change Data Capture).
- LOAD utility integration: LOAD inserts newly built expansion dictionaries into the CDDS when loading data into compressed table spaces defined for CDC (Change Data Capture).
- Enhanced DSNJU008 utility: New keyword EXCLIST(YES) enables printing of the CDDS exclusion list. This helps identify and resolve issues when dictionaries cannot be inserted into the CDDS.
- Db2 commands: -START CDDS and -STOP CDDS are now available for controlling CDDS operations explicitly when running in SOURCE_ONLY mode.

Handling CDDS Exclusion Lists

If Db2 encounters problems when inserting dictionaries into the CDDS, affected page sets are recorded in an exclusion list within the CDDS. Db2 administrators can use the DSNJU008 utility to print this exclusion list and resolve insertion failures using the REORG TABLESPACE utility with the INITCDDS option.

Operational Considerations

Ensure that the CDDS is defined on a volume or volumes in a storage group that is not listed in the database and log copy pool definitions when using BACKUP SYSTEM utility. This prevents the CDDS from being overwritten during a RESTORE SYSTEM operation, which restores volumes in these copy pools to their backup state.

Upon conditional or point-in-time system recovery, Db2 will automatically reset the CDDS, necessitating REORG TABLESPACE INITCDDS to repopulate it.

Getting Started

To leverage this capability, you must take the following actions:
1. Define the CDDS as a VSAM KSDS data set.
2. Set your subsystem parameter: CDDS_MODE = SOURCE_ONLY
3. Populate the CDDS using utilities like REORG TABLESPACE with the INITCDDS option.

Setting WQALLCRI for IFCID 0306

To enable decompression using the expansion dictionaries stored in the CDDS, applications that issue IFI READS calls for IFCID 0306 must specify the appropriate value in the WQALLCRI field of the IFI qualification area.

Use one of the following values:

  • X'05' (WQALLCR5) – Only log records for change data capture and unit of recovery control are returned. Compressed records are decompressed using dictionaries stored in the CDDS.
  • X'06' (WQALLCR6) – All types of log records are returned. Compressed records are decompressed using dictionaries stored in the CDDS.

These values instruct Db2 to use the expansion dictionaries stored in the CDDS for log record decompression, if the dictionaries are available.

Messages and Diagnostics

Several new or modified informational and warning messages have been introduced (including DSNI056I, DSNI057I, DSNI058I, DSNI059I, DSNI060I, DSNI061I, DSNJ375I, DSNJ395I, DSNJ396I, DSNU2939I, DSNU2940I and DSNU1650I) to assist administrators in managing the CDDS effectively, ensuring clarity and easier troubleshooting.

Additional Information

Users of replication products should refer to the respective documentation to determine whether this Db2 feature is supported and whether any changes are necessary.

For example, Q Replication for InfoSphere Data Replication (IIDR) will require APAR PH64273 applied. IBM Db2 Analytics Accelerator for z/OS Version 8.1 enables the CDDS usage by default.

Performance Benefits

When utilizing CDDS to decompress the log records, log read processes from replication products are expected to improve both CPU time and elapsed time. In IBM internal measurements, we have observed a range of 5% to up to 50% class 2 CPU time reduction from replication log read processes. Greater improvement was seen when one database contains large numbers of objects. These gains result from avoiding the need to acquire Db2 claims and DBD locks, minimizing the overhead of GBP dependency, and benefiting from performance enhancements in the handling of in-memory expansion dictionaries.

Internal performance measurements also showed minimal CPU and elapsed time overhead when inserting expansion dictionaries in the CDDS while processing SQL INSERT statements and REORG or LOAD utility operations. Note that Db2 can store up to three versions of expansion dictionaries per page set.

In addition to the previously mentioned Db2 for z/OS messages, existing CDDS statistics counters, originally introduced to support GDPS Continuous Availability in zero data loss environments, can be used to monitor CDDS activity at the system level.

 

Conclusion

APAR PH64099 provides a significant improvement for Db2 replication users. We encourage all Db2 administrators to explore and integrate this valuable functionality into their replication environments.

For detailed guidance, refer to the official IBM Db2 for z/OS documentation.

New-function APARs for Db2 13 in 2025

Utility changes in Db2 13

Storing the expansion dictionary for compressed log records in the compression dictionary data set

Modifying IFI READS calls for IFCID 0306 to indicate that the expansion dictionary is in the compression dictionary data set

0 comments
3 views

Permalink