Intel® QuickAssist Technology (QAT) QATzip Library
Installation
The QATzip library can be installed by either:
Installing from pre-built packages
Installing from source code
Distributions such as Fedora 34+, RHEL 9.1+, CentOS 9 Stream, and Ubunutu 24.04 each include qatzip packages within their repositories.
Important
The instructions here are to be used when using QATzip with qatlib.
If using qatzip with the out-of-tree QAT package, refer to the latest installation instructions available at:
Installing from Packages
This section outlines the installation of QATzip using package managers.
Instructions cover:
Ubuntu 24.04
RPM (RPM Package Manager)
Ubuntu 24.04
Note
To install QATzip on older versions of Ubuntu, you must manually compile and install it from the source code.
See the Installing from Sources section for instructions on installing from source.
Install the QATzip library by running the below command:
sudo -E apt install -y qatzip libqatzip3
Install the QATzip development package by running the below command:
sudo -E apt install -y libqatzip-dev
RPM
Install the QATzip library by running the below command:
sudo dnf -y install qatzip
Install the QATzip development package by running the below command:
sudo dnf -y install qatzip-devel
Important
If this package is not available we can build all QATzip packages from source files.
Prior to building the library, uninstall QATzip package using the following command:
sudo dnf remove qatzip
See the Installing from Sources section for instructions on installing from source.
Install the QATzip test application(s) by running the below command:
sudo dnf -y install qatzip-test
Important
If this package is not available we can build all QATzip packages from source files.
Prior to building the library, uninstall QATzip package using the following command:
sudo dnf remove qatzip
See the Installing from Sources section for instructions on compiling from source.
Installing from Sources
Install the package dependencies by running the below command:
sudo dnf install -y autoconf automake libtool zlib-devel lz4-devel
For Debian-based distros like Ubuntu, use these names for the latter two packages:
sudo apt -y install zlib1g-dev liblz4-dev
Obtain the QATzip source package by running the below commands:
cd ~ git clone https://github.com/intel/QATzip.git
Configure the QATzip library by running the following commands:
cd QATzip/ export QZ_ROOT=`pwd` ./autogen.sh ./configure
Build and install the QATzip library by running the below commands:
make clean make sudo make install
Configuration
At least one QAT endpoint needs to have data compression (dc) services enabled to utilize QATzip.
Refer to the following sections for details on configuring qatlib.
Managed Mode (when qat service is enabled)
Standalone Mode (without service)
Benchmarking
The QATzip package, when installed from source includes a test application that can be used for benchmarking.
The application is placed in test/
directory under the cloned QATzip repository.
Example test
taskset -c 1 ~/QATzip/test/qatzip-test -m 4 -l 100 -t 1 -D comp -L 1 -B 0 -i ./silesiaThis test performs compression test at level 1 utilizing QAT to compress file silesia. Software fallback is disabled in this test case.
Test Details
Usage:
Usage: ./qatzip-test [options]
Required options:
-m testMode 1 test memcpy feature
2 test Memory
3 test comp/decomp by default parameters
4 test comp/decomp by configurable parameters
5 test comp/decomp by format parameters
6 test set default configurable parameters
Optional options:
-i inputfile input source file
default by random generate data
-t thread_count maximum forks permitted in the current thread
0 means no forking permitted.
-l loop count default is 2
-v verify, disabled by default
-e init engine enable | disable. enabled by default
-s init session enable | disable. enabled by default
-A comp_algorithm deflate | lz4 | lz4s
-B swBack 0 means disable sw
1 means enable sw
-C hw_buff_sz default 64K
-b block_size If set this option, the test will split test
data into pieces. qzCompress/qzDecompress will
de/compress block_size bytes every time.
It must be the power of 2. The minimum is 4k,
and maximum is 1M. Default is -1, don't split
the test data.
-D direction comp | decomp | both
-F format [comp format]:[orig data size]/...
-L comp_lvl 1 - (12)
-O data_fmt deflate | gzip | gzipext | deflate_4B | lz4 | lz4s
-T huffmanType static | dynamic
-r req_cnt_thrshold max inflight request num, default is 16
-S thread_sleep the unit is milliseconds, default is a random time
-P polling set polling mode, default is periodical polling
-M svm set perf mode with file input, default is non
svm mode. When set to svm, all memory will
be allocated with malloc instead of qzMalloc
This option is only applied to test case 4
-p compress_buf_type pinned | common, default is common
This option is only applied to file compression test in case 4
If set common, memory of compress buffer will be allocated through malloc
If set pinned, memory of compress buffer will be allocated in huge page, the
allocation limit is 2M
-h Print this help message