xref: /dpdk/doc/guides/tools/comp_perf.rst (revision 25d11a86c56d50947af33d0b79ede622809bd8b9)
1..  SPDX-License-Identifier: BSD-3-Clause
2    Copyright(c) 2018 Intel Corporation.
3
4dpdk-test-compress-perf Tool
5============================
6
7The ``dpdk-test-compress-perf`` tool is a Data Plane Development Kit (DPDK)
8utility that allows measuring performance parameters of PMDs available in the
9compress tree. The tool reads the data from a file (--input-file),
10dumps all the file into a buffer and fills out the data of input mbufs,
11which are passed to compress device with compression operations.
12Then, the output buffers are fed into the decompression stage, and the resulting
13data is compared against the original data (verification phase). After that,
14a number of iterations are performed, compressing first and decompressing later,
15to check the throughput rate
16(showing cycles/iteration, cycles/Byte and Gbps, for compression and decompression).
17
18.. Note::
19
20	if the max-num-sgl-segs x seg_sz > input size then segments number in
21	the chain will be lower than value passed into max-num-sgl-segs.
22
23
24Limitations
25~~~~~~~~~~~
26
27* Stateful operation is not supported in this version.
28
29
30Command line options
31--------------------
32
33 ``--driver-name NAME``: compress driver to use
34
35 ``--input-file NAME``: file to compress and decompress
36
37 ``--extended-input-sz N``: extend file data up to this size (default: no extension)
38
39 ``--seg-sz N``: size of segment to store the data (default: 2048)
40
41 ``--burst-sz N``: compress operation burst size
42
43 ``--pool-sz N``: mempool size for compress operations/mbufs (default: 8192)
44
45 ``--max-num-sgl-segs N``: maximum number of segments for each mbuf (default: 16)
46
47 ``--num-iter N``: number of times the file will be compressed/decompressed (default: 10000)
48
49 ``--operation [comp/decomp/comp_and_decomp]``: perform test on compression, decompression or both operations
50
51 ``--huffman-enc [fixed/dynamic/default]``: Huffman encoding (default: dynamic)
52
53 ``--compress-level N``: compression level, which could be a single value, list or range (default: range between 1 and 9)
54
55 ``--window-sz N``: base two log value of compression window size (default: max supported by PMD)
56
57 ``-h``: prints this help
58
59
60Compiling the Tool
61------------------
62
63**Step 1: PMD setting**
64
65The ``dpdk-test-compress-perf`` tool depends on compression device drivers PMD which
66can be disabled by default in the build configuration file ``common_base``.
67The compression device drivers PMD which should be tested can be enabled by setting e.g.::
68
69   CONFIG_RTE_LIBRTE_PMD_ISAL=y
70
71
72Running the Tool
73----------------
74
75The tool has a number of command line options. Here is the sample command line:
76
77.. code-block:: console
78
79   ./build/app/dpdk-test-compress-perf  -l 4 -- --driver-name compress_qat --input-file test.txt --seg-sz 8192
80    --compress-level 1:1:9 --num-iter 10 --extended-input-sz 1048576  --max-num-sgl-segs 16 --huffman-enc fixed
81