libnxz implements a zlib-compatible API for Linux userspace programs that exploit the NX GZIP accelerator available on POWER9 and newer processors.
./configure
make
LD_PRELOAD=./libnxz.so /home/your_program
cp lib/libnxz.so.0.0 /usr/lib/ #(replace 0.0 with the version being used)
mv /usr/lib/libz.so /usr/lib/libz.so.bak
ln -s /usr/lib/libnxz.so.0.0 /usr/lib/libz.so
cd test
./configure
make
make check
By default, the NX-GZIP device with the nearest process to cpu affinity is selected. Consider using numactl -N 0 (or 8) to force your process attach to a particular device
The default log will be /tmp/nx.log. Use export NX_GZIP_LOGFILE=your.log
to specify a different log. By default, only errors will be recorded in log.
Use export NX_GZIP_VERBOSE=2
to record the more information.
Use export NX_GZIP_TRACE=1
to enable logic trace.
Use export NX_GZIP_TRACE=8
to enable statistics trace.
All the zlib supported functions are listed and described at libnxz.h.
If want to use nxzlib standalone, add a prefix 'nx_' before the function.
For example, use nx_compress
instead of compress
.