Skip to content

Performance Application

Marcel Cornu edited this page Jun 1, 2023 · 2 revisions

Intel(R) Multi-Buffer Crypto for IPsec Library - Performance Application

Overview

The performance application is used to measure the performance of all supported algorithms in the Intel(R) Multi-Buffer Crypto for IPsec Library. The application accepts a user specified algorithm as an input, and outputs the number of CPU cycles taken to process a range of buffer sizes for that algorithm. By default, all supported architectural implementations (e.g. SSE, AVX, AVX2 & AVX512) are exercised. The perf directory also contains scripts to add extra functionality to the application, and to post process the results.

See below for more information on application usage.

Notes:

  • For versions > v1.3, the performance application has been renamed from ipsec_perf to imb-perf.
    The new name will be used throughout this article, but all command line arguments are backward compatible.
  • For versions > v0.55 much of the ipsec_perf (now imb-perf) tool's functionality has been moved to the ipsec_perf_tool.py script.
    Please see the ipsec_perf_tool.py section below for more information.
  • In version v0.54, the performance application directory was renamed from LibPerfApp to perf.

Linux

Steps to compile perf/LibPerfApp tools:

  • Compile the library first with simple make
  • versions > v0.54: cd perf and make
  • versions <= v0.54: cd LibPerfApp and make
  • imb-perf command should appear in the current folder

Running perf/LibPerfApp tools:

  • For example, on Intel® Xeon® E5 v4 processors without AVX512: ./imb-perf --no-avx512 > file.txt
  • For example, on Intel® Atom® processors with SSE only: ./imb-perf --no-avx512 --no-avx2 --no-avx > file.txt
  • See ./imb-perf -h for more information
  • Use ipsec_diff_tool.py to compare two result files ./ipsec_diff_tool.py file_1.txt file_2.txt
  • To display results in form of a linear equation (slope & intercept): ./ipsec_diff_tool.py -a file_1.txt
  • The performance of a specific algorithm can be benchmarked using --cipher-algo, --hash-algo and --aead-algo
  • Example 1: run AES-GCM cipher suite 30,000 times on 16kB buffer exercising AVX512 implementation
    ./imb-perf --aead-algo aes-gcm-128 --arch AVX512
    Displays data in two columns, the first column includes packet sizes and the second one CPU cycles spent processing corresponding packet size.
  • Example 2: run AEAD Chacha20-Poly1305 cipher suite 30,000 times on 16kB buffer exercising AVX512 implementation
    ./imb-perf --aead-algo chacha20-poly1305 --arch AVX512 --job-size 16384 --job-iter 30000
    Displays number of CPU cycles spent processing single buffer size.
  • See ./imb-perf --help for more options

Windows

Steps to compile perf/LibPerfApp tools:

  • Compile the library first with simple nmake /f win_x64.mak
  • versions > v0.54: cd perf and nmake /f win_x64.mak
  • versions <= v0.54: cd LibPerfApp and nmake /f win_x64.mak
  • imb-perf.exe should appear in the current folder
  • ipsec_diff_tool.py is a Python script and it doesn't require any compilation

Running perf/LibPerfApp tools:

  • For example, on Intel® Xeon® E5 v4 processors without AVX512: imb-perf.exe --no-avx512 > file.txt
  • For example, on Intel® Atom® processors with SSE only: imb-perf.exe --no-avx512 --no-avx2 --no-avx > file.txt
  • See imb-perf.exe -h for more information
  • Use ipsec_diff_tool.py to compare two result files ipsec_diff_tool.py file_1.txt file_2.txt
  • To display results in form of a linear equation (slope & intercept): ipsec_diff_tool.py -a file_1.txt
  • The performance of a specific algorithm can be benchmarked using --cipher-algo, --hash-algo and --aead-algo.
  • Example 1: run AES-GCM cipher suite 30,000 times on 16kB buffer exercising AVX512 implementation
    imb-perf.exe --aead-algo aes-gcm-128 --arch AVX512
    Displays data in two columns, the first column includes packet sizes and the second one CPU cycles spent processing corresponding packet size.
  • Example 2: run AEAD Chacha20-Poly1305 cipher suite 30,000 times on 16kB buffer exercising AVX512 implementation
    imb-perf.exe --aead-algo chacha20-poly1305 --arch AVX512 --job-size 16384 --job-iter 30000
    Displays number of CPU cycles spent processing single buffer size.
  • See imb-perf.exe --help for more options

ipsec_perf_tool.py script (versions > v0.55)

For versions > v0.55, the ipsec_perf (now imb-perf) tool supports benchmarking specific algorithms only. To benchmark multiple algorithms, the ipsec_perf_tool.py script should be used. This acts as a wrapper script around the updated imb-perf tool to provide extra functionality while maintaining compatibility with the ipsec_diff_tool.py to parse and display results.

Running the ipsec_perf_tool.py script:

  • For example, to benchmark all cipher, hash and AEAD algorithms on all available architectures:
    ipsec_perf_tool.py > file.txt
  • To benchmark all cipher algorithms in encrypt direction using SSE and AVX architectures:
    ipsec_perf_tool.py -t cipher-only -d encrypt -a SSE -a AVX > file.txt
  • To benchmark all cipher-hash combinations using AVX512 architecture:
    ipsec_perf_tool.py -t cipher-hash-all -a AVX512 > file.txt
  • To distribute algorithm benchmarks across a range of cores from 2 to 10:
    ipsec_perf_tool.py -c 2-10 > file.txt
  • To display results in form of a linear equation (slope & intercept): ipsec_diff_tool.py -a file.txt
  • For more information: ipsec_perf_tool.py -h