xref: /dpdk/doc/guides/tools/comp_perf.rst (revision daa02b5cddbb8e11b31d41e2bf7bb1ae64dcae2f)
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 (showing cycles/iteration, cycles/Byte and Gbps,
18for compression and decompression).
19Another option: ``pmd-cyclecount``, gives the user the opportunity to measure
20the number of cycles per operation for the 3 phases: setup, enqueue_burst and
21dequeue_burst, for both compression and decompression. An optional delay can be
22inserted between enqueue and dequeue so no cycles are wasted in retries while
23waiting for a hardware device to finish. Although artificial, this allows
24to measure the minimum offload cost which could be achieved in a perfectly
25tuned system. Comparing the results of the two tests gives information about
26the trade-off between throughput and cycle-count.
27
28.. Note::
29
30	if the max-num-sgl-segs x seg_sz > input size then segments number in
31	the chain will be lower than value passed into max-num-sgl-segs.
32
33
34Limitations
35~~~~~~~~~~~
36
37* Stateful operation is not supported in this version.
38
39EAL Options
40~~~~~~~~~~~
41
42The following are the EAL command-line options that can be used in conjunction
43with the ``dpdk-test-compress-perf`` application.
44See the DPDK Getting Started Guides for more information on these options.
45
46*   ``-c <COREMASK>`` or ``-l <CORELIST>``
47
48	Set the hexadecimal bitmask of the cores to run on. The corelist is a
49	list cores to use.
50
51.. Note::
52
53	One lcore is needed for process admin, tests are run on all other cores.
54	To run tests on two lcores, three lcores must be passed to the tool.
55
56*   ``-a <PCI>``
57
58	Add a PCI device in allow list.
59
60*   ``--vdev <driver><id>``
61
62	Add a virtual device.
63
64Application Options
65~~~~~~~~~~~~~~~~~~~
66
67 ``--ptest [throughput/verify/pmd-cyclecount]``: set test type (default: throughput)
68
69 ``--driver-name NAME``: compress driver to use
70
71 ``--input-file NAME``: file to compress and decompress
72
73 ``--extended-input-sz N``: extend file data up to this size (default: no extension)
74
75 ``--seg-sz N``: size of segment to store the data (default: 2048)
76
77 ``--burst-sz N``: compress operation burst size
78
79 ``--pool-sz N``: mempool size for compress operations/mbufs (default: 8192)
80
81 ``--max-num-sgl-segs N``: maximum number of segments for each mbuf (default: 16)
82
83 ``--num-iter N``: number of times the file will be compressed/decompressed (default: 10000)
84
85 ``--operation [comp/decomp/comp_and_decomp]``: perform test on compression, decompression or both operations
86
87 ``--huffman-enc [fixed/dynamic/default]``: Huffman encoding (default: dynamic)
88
89 ``--compress-level N``: compression level, which could be a single value, list or range (default: range between 1 and 9)
90
91 ``--window-sz N``: base two log value of compression window size (default: max supported by PMD)
92
93 ``--external-mbufs``: allocate and use memzones as external buffers instead of keeping the data directly in mbuf areas
94
95 ``--cc-delay-us N``: delay between enqueue and dequeue operations in microseconds, valid only for the cyclecount test (default: 500 us)
96
97 ``-h``: prints this help
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_dir>/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