Juniper/warp17

Name: warp17

Owner: Juniper Networks

Description: The Stateful Traffic Generator for Layer 1 to Layer 7

Created: 2016-05-26 08:47:40.0

Updated: 2018-04-02 18:42:52.0

Pushed: 2018-02-28 17:13:43.0

Homepage: null

Size: 2405

Language: C

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

WARP17, The Stateful Traffic Generator

WARP17, The Stateful Traffic Generator for L1-L7 is a lightweight solution for generating high volumes of session based traffic with very high setup rates. WARP17 currently focuses on L5-L7 application traffic (e.g., HTTP) running on top of TCP as this kind of traffic requires a complete TCP implementation. Nevertheless, WARP17 also supports application traffic running on top of UDP.

Developing network components or services usually requires expensive proprietary solutions for validating the implemented functionalities and scalability or performance requirements. WARP17 is a platform agnostic tool based on DPDK which:

The WARP17 TCP/IP implementation runs completely in user-space thus avoiding the additional latency in the kernel stack. From a hardware perspective, WARP17 will be able to run on all the platforms that are supported by DPDK.

Performance benchmarks

Reference platform HW configuration

The configuration of the server on which the WARP17 benchmarks were run is:

NOTE: In order for the best performance to be achieved when running only one instance of WARP17, NICs were installed on different CPU sockets. In our case the two XL710 40G adapters were installed on socket 0 and socket 1.

For all tests we used the following WARP17 configuration (detailed descriptions of the command line arguments can be found in the WARP17 command-line arguments section):

Three types of session setup benchmarks were run, while emulating both the servers and the clients when using 16 lcores for each ethernet port:

For each type of traffic 3 charts are presented with results collected when running the test with different request/response message sizes. These charts show the client port:

It is interesting to see that when emulating real HTTP traffic on top of a few million TCP sessions, WARP17 can easily exhaust the 40Gbps throughput of the link.

NOTE: the script used to obtain the benchmark results is available in the codebase at examples/python/test_2_perf_benchmark.py. The script spawns WARP17 for each of the test configurations we were interested in.

TCP setup and data rates for RAW application traffic

NOTE: In the case when we only want to test the TCP control implementation (i.e., the TCP 3-way handshake and TCP CLOSE sequence), WARP17 achieved the maximum setup rate of 8.5M clients/s and 8.5M servers/s, so a total of 17M TCP sessions are handled every second.

The tests set up 20 million TCP sessions (i.e., 10 million TCP clients and 10 million TCP servers) on which clients continuously send fixed size requests (with random payload) and wait for fixed size responses from the servers.

TCP raw link usage TCP raw pps
TCP raw setup rate
TCP setup and data rates for HTTP application traffic

The tests set up 20 million TCP sessions (i.e., 10 million TCP clients and 10 million TCP servers) on which the clients continuously send HTTP GET requests and wait for the HTTP responses from the servers.

HTTP link usage HTTP pps
HTTP setup rate
UDP setup and data rates for RAW application traffic

The tests continuously send UDP fixed size packets (with random payload) from 10 million clients which are processed on the receing side by 10 million UDP listeners.

UDP raw link usage UDP raw pps

Installing and configuring

Prerequisites

Any 64 bit Linux distribution will do, however we have been testing this with Ubuntu Server 14.04 LTS. In addition we have made an OVF virtual machine image available, details can be found in the respective documentation.

Install build essential, python and ncurses
 apt-get install build-essential python ncurses-dev
Install DPDK 16.11.2
Install Google Protocol Buffers
Get WARP17

Get the warp17-<ver>.tgz archive or clone the desired release.

Compile WARP17
xfz warp17-<ver>.tgz
arp17-<ver>

Configure Python virtualenv
 apt-get install python-pip
 pip install virtualenv
ualenv warp17-venv
ce warp17-venv/bin/activate
install -r python/requirements.txt

Once installed, whenever python tests need to run the virtual environment must be activated:

ce warp17-venv/bin/activate

To exit the virtual environment and return to the default python interpretor and libraries:

tivate
Configure DPDK ports

Use the $RTE_SDK/tools/dpdk-setup.sh script (as described in the DPDK Guide). Select which ports to be controlled by the IGB UIO module: option [8] Bind Ethernet/Crypto device to IGB UIO module.

How to run

From the top directory of WARP17:

ild/warp17 <dpdk-command-line-args> -- <warp17-command-line-args>
Running as non-root

After compiling WARP17 change the owner of the binary to root (in order to allow access to /proc/self/pagemap:):

 chown root build/warp17

Set the suid bit on the binary in order to allow the user to keep permissions:

 chmod u+s build/warp17
Command-line arguments
DPDK command-line arguments

Please check section 3.1 of the DPDK App Guide for more info about DPDK command-line arguments.

NOTE: For now WARP17 supports at most 64 cores.

WARP17 command-line arguments

NOTE: Options qmap, qmap-default max-c/max-q, cannot be combined. Only one can be passed at a given time.

NOTE: Users are encouraged to use the “qmap-default max-q” option whenever ethernet ports are on the same socket as the PKT cores as this usually gives the best performance!

NOTE: The lowest two cores will be dedicated to CLI and management processing, and can not be assigned to a physical port for packet processing using the --qmap option!

Example (on a x86 server with 32G RAM for WARP17 and 4 memory channels):

For our example this translates into the following command:

ild/warp17 -c FC3 -n 4  -m 32768 -- --qmap-default max-q --tcb-pool-sz 32768 --cmd-file cfg.txt

which will start WARP17 with:

Using In-Memory-Ring-Based Interfaces

WARP17 can also be run when no physical interface is available. This is especially useful when developing new features as it removes the requirement of a specific hardware configuration. It also allows users to quickly try out WARP17 on their own laptop/VM.

In-Memory-Ring-Based Interfaces (let's just call them ring interfaces) are always created in pairs. The two interfaces in a pair act as if they would be physical interfaces connected back to back.

By default the support for ring interfaces is disabled. However the user can easily enable it by compiling WARP17 with the following command:

 all-ring-if

Using the --ring-if-pairs <number> command line argument the user can specify the number of ring interface pairs that WARP17 will create. Updating the previous command line example we end up with:

ild/warp17 -c FC3 -n 4  -m 32768 -- --qmap-default max-q --tcb-pool-sz 32768 --ring-if-pairs 1 --cmd-file cfg.txt

This will start WARP17 and add a pair of ring interfaces connected back to back.

The user can also use custom queue mappings for ring interfaces. The ring interface pairs are always created after physical interfaces. This means that their IDs will be allocated in order after physical IDs. For example:

ild/warp17 -c FC3 -n 4  -m 32768 -w 0000:82:00.0 -- --ring-if-pairs 1

This will start WARP17 with three interfaces (one physical and two ring interfaces). The physical interface (0000:82:00.0) will have ID 0 while the two ring interfaces will have IDs 1 and 2.

NOTE: There's a restriction in place when using ring interfaces: the user must make sure that the same number of TX/RX queues is created through qmaps for both ring interfaces in a pair. Otherwise the command line will be rejected.

Using Kernel Network Interface (KNI) Interfaces

WARP17 can also be run with a virtual interface into the Linux kernel. This is especially useful when developing a new protocol and you want to test it agains a known working server or client. See the HTTP example below.

By default the support for KNI interfaces is disabled. However the user can easily enable it by compiling WARP17 with the following command:

 all-kni-if

Using the --kni-ifs <number> command line argument the user can specify the number of KNI interfaces that WARP17 will create. Updating the previous command line example we end up with:

ild/warp17 -c FC3 -n 4  -m 32768 -- --qmap-default max-q --tcb-pool-sz 32768 --kni-ifs 2 --cmd-file cfg.txt

The user can also use custom queue mappings for KNI interfaces, however they can only be assigned to a single core. The KNI interfaces are always created after the physical and ring interfaces. This means that their IDs will be allocated in order after physical IDs. For example:

ild/warp17 -c FC3 -n 4  -m 32768 -w 0000:82:00.0 -- --ring-if-pairs 1 --kni-ifs 2

This will start WARP17 with five interfaces (one physical, two ring interfaces and two KNI interfaces). The physical interface (0000:82:00.0) will have ID 0, the two ring interfaces will have IDs 1 and 2, and the two KNI interfaces will have IDs 3 and 4.

For the example above the two Kernel interfaces will be named warp3 and warp4, so the naming convention is warp<eth_port>

The following example will show how to use the KNI interface to get some HTTP data from the built in HTTP server trough Linux. We assume no physical ports are configured, if you have them make sure you increase all the referenced ports:

 modprobe rte_kni
ild/warp17 -c FC3 -n 4  -m 32768 -w 0000:00:00.0 -- --kni-ifs 1
 ip link set warp0 up
 ip addr add 172.16.1.1/24 dev warp0
tests l3_intf port 0 ip 172.16.1.2 mask 255.255.255.0
tests l3_gw port 0 gw 172.16.1.1
tests server tcp port 0 test-case-id 0 src 172.16.1.2 172.16.1.2 sport 80 80
tests server http port 0 test-case-id 0 200-OK resp-size 2000
t tests port 0
P17:~]$ wget 172.16.1.2
16-10-25 11:40:43--  http://172.16.1.2/
ecting to 172.16.1.2:80... connected.
 request sent, awaiting response... 200 OK
th: 2000 (2.0K)
ng to: ?index.html?

x.html                         100%[================================================================>]   1.95K  --.-KB/s   in 0s

-10-25 11:40:43 (478 MB/s) - ?index.html? saved [2000/2000]

CLI

Test configuration commands

NOTE: Only IPv4 is supported for now!

Application configuration and statistics commands

Currently only RAW TCP (L5-L7 payload is random) and a sub-set of HTTP 1.1 (GET/HEAD and 200 OK/404 NOT FOUND) traffic is supported.

Before configuring the application behavior the user must have previously defined the client or server test cases.

Displaying test information
Statistics and operational information

Different types of statistics can be dumped from the CLI. Currently all these stats are not directly linked to any test case ID but they are aggregate per ethernet port.

Infrastructure statistics

UI

show tests ui displays an UI which allows monitoring the test execution.

The UI is split in 4 main areas:

Example run

Some example configuration files can be found in the examples/ directory. The configuration files can either be passed as a command-line argument, --cmd-file=<file>, when running WARP17 or executed directly in the CLI.

Python scripting API

WARP17 offers an RPC-based API which allows users to write scripts and automate the tests that WARP17 would run. WARP17 listens to incoming RPC connections on TCP port 42424.

The RPC object definitions can be found in the api/*.proto files. The main RPC interface is defined in api/warp17-service.proto. All *.proto files are compiled into Python classes when building WARP17. The generated code is saved in the api/generated/py directory (one .py file for each .proto definition file).

A short example about how to use the Python API can be found in examples/python/test_1_http_4M.py. The example sets up 4M HTTP clients and servers, polls for statistics and stops the tests after a while.

Perl scripting API

WARP17 can also be scripted through Perl by using the Inline::Python module. A short example about how to use Perl to script WARP17 can be found in examples/perl/test_1_http_4M.pl. Requirements for running the Perl scripts:

 apt-get install python2.7-dev cpanminus
 cpanm Inline::Python

 perl -I ./perl/ examples/perl/test_1_http_4M.pl

Contributing a new L7 Application implementation

WARP17 currently supports RAW TCP and HTTP 1.1 application traffic. Even though we are currently working on adding support for more application implementations, external contributions are welcome.

As a future development WARP17 will offer a socket API in order to allow applications to be easily plugged in. Until then any new application must be directly added to the WARP17 code. As an example, a good starting point is the HTTP 1.1 implementation itself.

In general, an application called foo should implement the following:

config commit.template ./.git-commit.template

Release notes

For a summary of the currently supported functionalities please check the RELEASE_NOTES file.

Roadmap for future releases

Contact

Feel free to also check out the WARP17 google group.

For a list of maintainers and contributors please check the MAINTAINERS and CONTRIBUTORS files.

License

WARP17 is released under BSD 3-Clause license. The license file can be found here.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.