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 ``--algo [null/deflate/lzs/lz4]`` : perform test on algorithm null (DMA), deflate, lzs or lz4 (default: deflate) 88 89 ``--huffman-enc [fixed/dynamic/default]``: Huffman encoding (default: dynamic) 90 91 ``--lz4-flags N``: flags for LZ4, 92 see `LZ4 Frame Descriptor <https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md#frame-descriptor>`_ (default: no flags) 93 94 ``--compress-level N``: compression level, which could be a single value, list or range (default: range between 1 and 9) 95 96 ``--window-sz N``: base two log value of compression window size (default: max supported by PMD) 97 98 ``--external-mbufs``: allocate and use memzones as external buffers instead of keeping the data directly in mbuf areas 99 100 ``--cc-delay-us N``: delay between enqueue and dequeue operations in microseconds, valid only for the cyclecount test (default: 500 us) 101 102 ``-h``: prints this help 103 104 105Running the Tool 106---------------- 107 108The tool has a number of command line options. Here is the sample command line: 109 110.. code-block:: console 111 112 ./<build_dir>/app/dpdk-test-compress-perf -l 4 -- --driver-name compress_qat --input-file test.txt --seg-sz 8192 113 --compress-level 1:1:9 --num-iter 10 --extended-input-sz 1048576 --max-num-sgl-segs 16 --huffman-enc fixed 114