Db2 for z/OS Dual Logging: zHyperWrite and zHyperLink—are they related?

Posted By: Sharon Roeder Technical Content,

WRITTEN BY: SHARON ROEDER, IBM


zHyperWrite and zHyperLink certainly sound very similar. Both have definite performance benefits for Db2 dual logging, and both require DFSMS Media Manager software to leverage specific z/OS features. However, when it comes to Db2 Log Manager, they are really two different sets of functionality controlled by two different system parameters. This discussion focuses on Db2 dual active logging. 


zHyperWrite

In Db2 10 for z/OS, zHyperWrite support was added to improve overall Db2 performance for customer shops that use Peer-to-Peer Remote Copy (PPRC) where log write performance suffers delays waiting for sequential copy to the remote secondary to complete. This can impact the entire Db2 subsystem if the log buffer fills due to slow I/O response time. PPRC is most often used to mirror Db2 production volumes to a remote site for high availability. 

Media Manager introduced the capability to have software control the remote copy process beginning with z/OS 2.1 which includes the zHyperWrite functionality. Performance improves because the write to the secondary volumes are performed in parallel to the write to the primary rather than sequentially after the primary IO is finished.

The online changeable REMOTE_COPY_SW_ACCEL subsystem parameter enables software acceleration of the remote copy process for active logs. Db2 log manager asynchronously invokes Media Manager to write COPY1 and then COPY2. Media Manager notifies Db2 when the writes to PPRC primary and secondary volumes are complete. It improves overall Db2 performance in PPRC environments at the cost of additional MSTR SRB CPU time due to the additional I/O request. The improvement percentage is dependent on the local distance, log write size and DASD. As of Db2 11 for z/OS, the additional CPU was made zIIP eligible.Figure 1. Db2 for z/OS and Media Manager zHyperWrite support for PPRC 


zHyperLink 

In 2021 for z/OS V2R3 and later, Media Manager zHyperLink write software was enhanced to support parallel writes (Media Manager Dual Logging). Db2 12 for z/OS leveraged this enhancement to perform log writes to the two active logs in parallel using one zHyperLink synchronous I/O request. This improves transaction response time, reduces the latency for log writes, speeds up commits, and reduces lock and latch held times. 

The online changeable ZHYPERLINK subsystem parameter specifies the scope of the zHyperLink protocol for I/O request. Specify either ENABLE or ACTIVELOG to enable the zHyperLink protocol for I/O requests for active logs. Both active log data sets must be associated with a SMS storage class where zHyperLink write is enabled and must reside on IBM DS8880/DS8900 DASD subsystems with zHyperLink enabled volumes. 

Db2 makes a synchronous call to zHyperLink I/O to write both COPY1 and COPY2 active logs so the CPU spins while waiting for the I/O to complete. The clock time is charged to MSTR SRB CPU but is zIIP-eligible so does not incur additional charges. Examine current usage of zIIP processors and plan for more capacity, if necessary, before implementing zHyperLink writes for active logs.

Figure 2. Db2 for z/OS dual logging using zHyperLink with Media Manager parallel write support 


Conclusion

zHyperLink allows for I/O to be performed synchronously rather than traditional asynchronous I/O. zHyperWrite uses asynchronous I/O. zHyperLink dual logging is one synchronous call to Media Manager to write to both logs in parallel. zHyperWrite allows for parallel writes to PPRC primary and secondary volumes via an asynchronous call; two for dual logging. They are two completely different sets of functionality so a true comparison is akin to comparing apples and oranges.

If zHyperWrite is enabled but zHyperLink is not enabled, only zHyperWrite is done. When zHyperLink is enabled, DFSMS does a zHyperWrite implicitly even if REMOTE_COPY_SW_ACCEL is not enabled.

Use Db2 command -DISPLAY LOG to determine the status of both SOFTWARE ACCELERATION (zHyperWrite) and ZHYPERLINK WRITE (zHyperLink).

Figure 3. Db2 for z/OS dual logging with both REMOTE_COPY_SW_ACCEL and ZHYPERLINK enabled 

Figure 4. Db2 for z/OS dual logging with just REMOTE_COPY_SW_ACCEL enabled


References:
zHyperWrite and PPRC

https://www.ibm.com/docs/en/db2-for-zos/12?topic=daldsp-remote-copy-sw-accel-field-remote-copy-sw-accel-subsystem-parameter

https://www.ibm.com/docs/en/zos/2.4.0?topic=parameters-hyperwrite

https://www.ibm.com/docs/en/zos/2.3.0?topic=copy-peer-peer-remote-pprc

zHyperLink

https://www.ibm.com/docs/en/db2-for-zos/12?topic=panel-db2-zhyperlinks-scope-field-zhyperlink-subsystem-parameter

https://www.ibm.com/docs/en/ds8880/8.5.3?topic=io-zhyperlink-overview

https://publibz.boulder.ibm.com/zoslib/pdf/21-08-10-HT-Faster_zHyperLink.pdf