xref: /dpdk/doc/guides/tools/comp_perf.rst (revision 089e5ed727a15da2729cfee9b63533dd120bd04c)
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. User can use multiple cores to run tests on but only
10one type of compression PMD can be measured during single application
11execution. The tool reads the data from a file (--input-file),
12dumps all the file into a buffer and fills out the data of input mbufs,
13which are passed to compress device with compression operations.
14Then, the output buffers are fed into the decompression stage, and the resulting
15data is compared against the original data (verification phase). After that,
16a number of iterations are performed, compressing first and decompressing later,
17to check the throughput rate
18(showing cycles/iteration, cycles/Byte and Gbps, for compression and decompression).
19
20.. Note::
21
22	if the max-num-sgl-segs x seg_sz > input size then segments number in
23	the chain will be lower than value passed into max-num-sgl-segs.
24
25
26Limitations
27~~~~~~~~~~~
28
29* Stateful operation is not supported in this version.
30
31EAL Options
32~~~~~~~~~~~
33
34The following are the EAL command-line options that can be used in conjunction
35with the ``dpdk-test-compress-perf`` application.
36See the DPDK Getting Started Guides for more information on these options.
37
38*   ``-c <COREMASK>`` or ``-l <CORELIST>``
39
40	Set the hexadecimal bitmask of the cores to run on. The corelist is a
41	list cores to use.
42
43.. Note::
44
45	One lcore is needed for process admin, tests are run on all other cores.
46	To run tests on two lcores, three lcores must be passed to the tool.
47
48*   ``-w <PCI>``
49
50	Add a PCI device in white list.
51
52*   ``--vdev <driver><id>``
53
54	Add a virtual device.
55
56Application Options
57~~~~~~~~~~~~~~~~~~~
58
59 ``--ptest [benchmark/verify]``: set test type (default: benchmark)
60
61 ``--driver-name NAME``: compress driver to use
62
63 ``--input-file NAME``: file to compress and decompress
64
65 ``--extended-input-sz N``: extend file data up to this size (default: no extension)
66
67 ``--seg-sz N``: size of segment to store the data (default: 2048)
68
69 ``--burst-sz N``: compress operation burst size
70
71 ``--pool-sz N``: mempool size for compress operations/mbufs (default: 8192)
72
73 ``--max-num-sgl-segs N``: maximum number of segments for each mbuf (default: 16)
74
75 ``--num-iter N``: number of times the file will be compressed/decompressed (default: 10000)
76
77 ``--operation [comp/decomp/comp_and_decomp]``: perform test on compression, decompression or both operations
78
79 ``--huffman-enc [fixed/dynamic/default]``: Huffman encoding (default: dynamic)
80
81 ``--compress-level N``: compression level, which could be a single value, list or range (default: range between 1 and 9)
82
83 ``--window-sz N``: base two log value of compression window size (default: max supported by PMD)
84
85 ``-h``: prints this help
86
87
88Compiling the Tool
89------------------
90
91**Step 1: PMD setting**
92
93The ``dpdk-test-compress-perf`` tool depends on compression device drivers PMD which
94can be disabled by default in the build configuration file ``common_base``.
95The compression device drivers PMD which should be tested can be enabled by setting e.g.::
96
97   CONFIG_RTE_LIBRTE_PMD_ISAL=y
98
99
100Running the Tool
101----------------
102
103The tool has a number of command line options. Here is the sample command line:
104
105.. code-block:: console
106
107   ./build/app/dpdk-test-compress-perf  -l 4 -- --driver-name compress_qat --input-file test.txt --seg-sz 8192
108    --compress-level 1:1:9 --num-iter 10 --extended-input-sz 1048576  --max-num-sgl-segs 16 --huffman-enc fixed
109