feat(docs): Add Methodology
[csit.git] / docs / content / methodology / hoststack_testing / tcpip_with_iperf3.md
1 ---
2 bookToc: false
3 title: "TCP/IP with iperf3"
4 weight: 2
5 ---
6
7 # TCP/IP with iperf3
8
9 [iperf3 goodput measurement tool](https://github.com/esnet/iperf)
10 is used for measuring the maximum attainable goodput of the VPP Host
11 Stack connection across two instances of VPP running on separate DUT
12 nodes. iperf3 is a popular open source tool for active measurements
13 of the maximum achievable goodput on IP networks.
14
15 Because iperf3 utilizes the POSIX socket interface APIs, the current
16 test configuration utilizes the LD_PRELOAD mechanism in the linux
17 kernel to connect iperf3 to the VPP Host Stack using the VPP
18 Communications Library (VCL) LD_PRELOAD library (libvcl_ldpreload.so).
19
20 In the future, a forked version of iperf3 which has been modified to
21 directly use the VCL application APIs may be added to determine the
22 difference in performance of 'VCL Native' applications versus utilizing
23 LD_PRELOAD which inherently has more overhead and other limitations.
24
25 The test configuration is as follows:
26
27            DUT1              Network               DUT2
28     [ iperf3-client -> VPP1 ]=======[ VPP2 -> iperf3-server]
29
30 where,
31
32 1. iperf3 server attaches to VPP2 and LISTENs on VPP2:TCP port 5201.
33 2. iperf3 client attaches to VPP1 and opens one or more stream
34    connections to VPP2:TCP port 5201.
35 3. iperf3 client transmits a uni-directional stream as fast as the
36    VPP Host Stack allows to the iperf3 server for the test duration.
37 4. At the end of the test the iperf3 client emits the goodput
38    measurements for all streams and the sum of all streams.
39
40 Test cases include 1 and 10 Streams with a 20 second test duration
41 with the VPP Host Stack configured to utilize the Cubic TCP
42 congestion algorithm.
43
44 Note: iperf3 is single threaded, so it is expected that the 10 stream
45 test shows little or no performance improvement due to
46 multi-thread/multi-core execution.
47
48 There are also variations of these test cases which use the VPP Network
49 Simulator (NSIM) plugin to test the VPP Hoststack goodput with 1 percent
50 of the traffic being dropped at the output interface of VPP1 thereby
51 simulating a lossy network. The NSIM tests are experimental and the
52 test results are not currently representative of typical results in a
53 lossy network.