Activating the GenWQE hardware-accelerated zlib for an application

Red Hat Enterprise Linux 9.2 LPAR mode z/VM guest

Whether and how you can make an application use the GenWQE hardware-accelerated zlib depends on how the application links to libz.so.

Examine the application for links to libz.so, for example with the ldd tool.
  • If the application does not link to libz.so or if it statically links to libz.so, it would require recompilation, and possibly code changes, to make acceleration through GenWQE possible.
  • If an application dynamically links to libz.so, you might be able to redirect the library calls from the default implementation to the GenWQE hardware-accelerated zlib.

Some applications require zlib features that are not available from the GenWQE hardware-accelerated zlib. Such applications fail if a global redirect is put in place. The following technique redirects calls for the scope of a particular application.

Specify the LD_PRELOAD environment variable to load the GenWQE hardware-accelerated zlib. Set the variable with the start command for your application.
Example:
# LD_PRELOAD=/lib/s390x-linux-gnu/genwqe/libz.so.1 <application_start_cmd>