z/TPF - Group home

z/TPF support for zlib 1.2.11 and hardware accelerated compression (APAR PJ45872)

  
With the release of the IBM z15 processor, z/TPF can now compress and decompress data by using hardware acceleration.  To support this, we have also upgraded our zlib support to version 1.2.11, and are now shipping zlib as a shared object.
 
By default, applications using zlib will perform compression and decompression by using the hardware acceleration, with exceptions based on specific criteria:
 
1) The _HZC_COMPRESSION_METHOD environment variable can be set to "software"
2) The initial buffer passed to a deflate / inflate API is smaller than 256 bytes
3) A software only strategy is used on deflate.  Only Z_FIXED and Z_DEFAULT_STRATEGY can be used as deflate parameters with hardware compression.

 

The following zlib APIs can only be used if the zlib stream is in software mode:
 
deflatePrime
inflatePrime
inflateMark
inflateBackInit
inflateBack
inflateBackEnd
inflateGetDictionary
deflateGetDictionary
inflateValidate
inflateCodesUsed
deflateResetKeep
inflateSyncPoint
inflateUndermine
inflateResetKeep 
 
When performing hardware accelerated compression, the compression performed might result in a larger size of data than a similar request performed by using software compression.  There might be scenarios that prioritize space savings over compression time.   For these scenarios, use one of the methods above to force zlib to use software compression for that use case.
 
In addition to hardware accelerated support for zlib, we are also introducing two z/TPF specific APIs which can be used to compress and decompress data by using the hardware acceleration only.   These APIs will return a failure return code on systems not at z15 or later.  
 
The tpf_compress and tpf_expand APIs provide a more direct interface to the hardware compression function, but are also less flexible.  They are targeted to use cases where you do not require a compression header / trailer and also have the entire contents of the compressed data to expand, or the entire data you wish to compress, as well as buffers capable of handling the output. 
 
We've observed significant performance savings by leveraging the hardware acceleration. Your performance and compression ratios will vary based on the input data contents and size.

 

size (in KB)  
zlib software (usec) 
zlib hardware (usec)
improvement
tpf_compress (usec) 
improvement
16
580
25
23x
5
116x
64
3229
49
66x
11
294x
256
12800
129
99x
29
441x
2000
114126
295
387x
229
498x
20000
1111271
2766
402x
2159
515x
 
 
For more information about APAR PJ45872, see the APEDIT.