rls1710 report: added ref to vpp vpp-config tool.
[csit.git] / docs / report / vpp_performance_tests / overview.rst
1 Overview
2 ========
3
4 .. _tested_physical_topologies:
5
6 Tested Physical Topologies
7 --------------------------
8
9 CSIT VPP performance tests are executed on physical baremetal servers hosted by
10 :abbr:`LF (Linux Foundation)` FD.io project. Testbed physical topology is shown
11 in the figure below.::
12
13     +------------------------+           +------------------------+
14     |                        |           |                        |
15     |  +------------------+  |           |  +------------------+  |
16     |  |                  |  |           |  |                  |  |
17     |  |                  <----------------->                  |  |
18     |  |       DUT1       |  |           |  |       DUT2       |  |
19     |  +--^---------------+  |           |  +---------------^--+  |
20     |     |                  |           |                  |     |
21     |     |            SUT1  |           |  SUT2            |     |
22     +------------------------+           +------------------^-----+
23           |                                                 |
24           |                                                 |
25           |                  +-----------+                  |
26           |                  |           |                  |
27           +------------------>    TG     <------------------+
28                              |           |
29                              +-----------+
30
31 SUT1 and SUT2 are two System Under Test servers (Cisco UCS C240, each with two
32 Intel XEON CPUs), TG is a Traffic Generator (TG, another Cisco UCS C240, with
33 two Intel XEON CPUs). SUTs run VPP SW application in Linux user-mode as a
34 Device Under Test (DUT). TG runs TRex SW application as a packet Traffic
35 Generator. Physical connectivity between SUTs and to TG is provided using
36 different NIC models that need to be tested for performance. Currently
37 installed and tested NIC models include:
38
39 #. 2port10GE X520-DA2 Intel.
40 #. 2port10GE X710 Intel.
41 #. 2port10GE VIC1227 Cisco.
42 #. 2port40GE VIC1385 Cisco.
43 #. 2port40GE XL710 Intel.
44
45 From SUT and DUT perspective, all performance tests involve forwarding packets
46 between two physical Ethernet ports (10GE or 40GE). Due to the number of
47 listed NIC models tested and available PCI slot capacity in SUT servers, in
48 all of the above cases both physical ports are located on the same NIC. In
49 some test cases this results in measured packet throughput being limited not
50 by VPP DUT but by either the physical interface or the NIC capacity.
51
52 Going forward CSIT project will be looking to add more hardware into FD.io
53 performance labs to address larger scale multi-interface and multi-NIC
54 performance testing scenarios.
55
56 For test cases that require DUT (VPP) to communicate with
57 VirtualMachines (VMs) / Containers (Linux or Docker Containers) over
58 vhost-user/memif interfaces, N of VM/Ctr instances are created on SUT1
59 and SUT2. For N=1 DUT forwards packets between vhost/memif and physical
60 interfaces. For N>1 DUT a logical service chain forwarding topology is
61 created on DUT by applying L2 or IPv4/IPv6 configuration depending on
62 the test suite. DUT test topology with N VM/Ctr instances is shown in
63 the figure below including applicable packet flow thru the DUTs and
64 VMs/Ctrs (marked in the figure with ``***``).::
65
66     +-------------------------+           +-------------------------+
67     | +---------+ +---------+ |           | +---------+ +---------+ |
68     | |VM/Ctr[1]| |VM/Ctr[N]| |           | |VM/Ctr[1]| |VM/Ctr[N]| |
69     | |  *****  | |  *****  | |           | |  *****  | |  *****  | |
70     | +--^---^--+ +--^---^--+ |           | +--^---^--+ +--^---^--+ |
71     |   *|   |*     *|   |*   |           |   *|   |*     *|   |*   |
72     | +--v---v-------v---v--+ |           | +--v---v-------v---v--+ |
73     | |  *   *       *   *  |*|***********|*|  *   *       *   *  | |
74     | |  *   *********   ***<-|-----------|->***   *********   *  | |
75     | |  *    DUT1          | |           | |       DUT2       *  | |
76     | +--^------------------+ |           | +------------------^--+ |
77     |   *|                    |           |                    |*   |
78     |   *|            SUT1    |           |  SUT2              |*   |
79     +-------------------------+           +-------------------------+
80         *|                                                     |*
81         *|                                                     |*
82         *|                    +-----------+                    |*
83         *|                    |           |                    |*
84         *+-------------------->    TG     <--------------------+*
85         **********************|           |**********************
86                               +-----------+
87
88 For VM/Ctr tests, packets are switched by DUT multiple times: twice for
89 a single VM/Ctr, three times for two VMs/Ctrs, N+1 times for N VMs/Ctrs.
90 Hence the external throughput rates measured by TG and listed in this
91 report must be multiplied by (N+1) to represent the actual DUT aggregate
92 packet forwarding rate.
93
94 Note that reported DUT (VPP) performance results are specific to the SUTs
95 tested. Current :abbr:`LF (Linux Foundation)` FD.io SUTs are based on Intel
96 XEON E5-2699v3 2.3GHz CPUs. SUTs with other CPUs are likely to yield different
97 results. A good rule of thumb, that can be applied to estimate VPP packet
98 thoughput for Phy-to-Phy (NIC-to-NIC, PCI-to-PCI) topology, is to expect
99 the forwarding performance to be proportional to CPU core frequency,
100 assuming CPU is the only limiting factor and all other SUT parameters
101 equivalent to FD.io CSIT environment. The same rule of thumb can be also
102 applied for Phy-to-VM/Ctr-to-Phy (NIC-to-VM/Ctr-to-NIC) topology, but due to
103 much higher dependency on intensive memory operations and sensitivity to Linux
104 kernel scheduler settings and behaviour, this estimation may not always yield
105 good enough accuracy.
106
107 For detailed FD.io CSIT testbed specification and topology, as well as
108 configuration and setup of SUTs and DUTs testbeds please refer to
109 :ref:`test_environment`.
110
111 Similar SUT compute node and DUT VPP settings can be arrived to in a
112 standalone VPP setup by using a `vpp-config configuration tool
113 <https://wiki.fd.io/view/VPP_Configuration_Tool>`_ developed within the
114 VPP project using CSIT recommended settings and scripts.
115
116 Performance Tests Coverage
117 --------------------------
118
119 Performance tests are split into two main categories:
120
121 - Throughput discovery - discovery of packet forwarding rate using binary search
122   in accordance to :rfc:`2544`.
123
124   - NDR - discovery of Non Drop Rate packet throughput, at zero packet loss;
125     followed by one-way packet latency measurements at 10%, 50% and 100% of
126     discovered NDR throughput.
127   - PDR - discovery of Partial Drop Rate, with specified non-zero packet loss
128     currently set to 0.5%; followed by one-way packet latency measurements at
129     100% of discovered PDR throughput.
130
131 - Throughput verification - verification of packet forwarding rate against
132   previously discovered throughput rate. These tests are currently done against
133   0.9 of reference NDR, with reference rates updated periodically.
134
135 CSIT |release| includes following performance test suites, listed per NIC type:
136
137 - 2port10GE X520-DA2 Intel
138
139   - **L2XC** - L2 Cross-Connect switched-forwarding of untagged, dot1q, dot1ad
140     VLAN tagged Ethernet frames.
141   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames
142     with MAC learning; disabled MAC learning i.e. static MAC tests to be added.
143   - **L2BD Scale** - L2 Bridge-Domain switched-forwarding of untagged Ethernet
144     frames with MAC learning; disabled MAC learning i.e. static MAC tests to be
145     added with 20k, 200k and 2M FIB entries.
146   - **IPv4** - IPv4 routed-forwarding.
147   - **IPv6** - IPv6 routed-forwarding.
148   - **IPv4 Scale** - IPv4 routed-forwarding with 20k, 200k and 2M FIB entries.
149   - **IPv6 Scale** - IPv6 routed-forwarding with 20k, 200k and 2M FIB entries.
150   - **VMs with vhost-user** - virtual topologies with 1 VM and service chains
151     of 2 VMs using vhost-user interfaces, with VPP forwarding modes incl. L2
152     Cross-Connect, L2 Bridge-Domain, VXLAN with L2BD, IPv4 routed-forwarding.
153   - **COP** - IPv4 and IPv6 routed-forwarding with COP address security.
154   - **ACL** - L2 Bridge-Domain switched-forwarding and IPv4 and IPv6 routed-
155     forwarding with iACL and oACL IP address, MAC address and L4 port security.
156   - **LISP** - LISP overlay tunneling for IPv4-over-IPv4, IPv6-over-IPv4,
157     IPv6-over-IPv6, IPv4-over-IPv6 in IPv4 and IPv6 routed-forwarding modes.
158   - **VXLAN** - VXLAN overlay tunnelling integration with L2XC and L2BD.
159   - **QoS Policer** - ingress packet rate measuring, marking and limiting
160     (IPv4).
161   - **NAT** - (Source) Network Address Translation tests with varying
162     number of users and ports per user.
163   - **Container memif connections** - VPP memif virtual interface tests to
164     interconnect VPP instances with L2XC and L2BD.
165   - **Container Orchestrated Topologies** - Container topologies connected over
166     the memif virtual interface.
167
168 - 2port40GE XL710 Intel
169
170   - **L2XC** - L2 Cross-Connect switched-forwarding of untagged Ethernet frames.
171   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames
172     with MAC learning.
173   - **IPv4** - IPv4 routed-forwarding.
174   - **IPv6** - IPv6 routed-forwarding.
175   - **VMs with vhost-user** - virtual topologies with 1 VM and service chains
176     of 2 VMs using vhost-user interfaces, with VPP forwarding modes incl. L2
177     Cross-Connect, L2 Bridge-Domain, VXLAN with L2BD, IPv4 routed-forwarding.
178   - **IPSec** - IPSec encryption with AES-GCM, CBC-SHA1 ciphers, in combination
179     with IPv4 routed-forwarding.
180   - **IPSec+LISP** - IPSec encryption with CBC-SHA1 ciphers, in combination
181     with LISP-GPE overlay tunneling for IPv4-over-IPv4.
182
183 - 2port10GE X710 Intel
184
185   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames
186     with MAC learning.
187   - **VMs with vhost-user** - virtual topologies with 1 VM using vhost-user
188     interfaces, with VPP forwarding modes incl. L2 Bridge-Domain.
189
190 - 2port10GE VIC1227 Cisco
191
192   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames
193     with MAC learning.
194
195 - 2port40GE VIC1385 Cisco
196
197   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames
198      with MAC learning.
199
200 Execution of performance tests takes time, especially the throughput discovery
201 tests. Due to limited HW testbed resources available within FD.io labs hosted
202 by :abbr:`LF (Linux Foundation)`, the number of tests for NICs other than X520
203 (a.k.a. Niantic) has been limited to few baseline tests. CSIT team expect the
204 HW testbed resources to grow over time, so that complete set of performance
205 tests can be regularly and(or) continuously executed against all models of
206 hardware present in FD.io labs.
207
208 Performance Tests Naming
209 ------------------------
210
211 CSIT |release| follows a common structured naming convention for all performance
212 and system functional tests, introduced in CSIT |release-1|.
213
214 The naming should be intuitive for majority of the tests. Complete description
215 of CSIT test naming convention is provided on `CSIT test naming wiki
216 <https://wiki.fd.io/view/CSIT/csit-test-naming>`_.
217
218 Methodology: Multi-Core and Multi-Threading
219 -------------------------------------------
220
221 **Intel Hyper-Threading** - CSIT |release| performance tests are executed with
222 SUT servers' Intel XEON processors configured in Intel Hyper-Threading Disabled
223 mode (BIOS setting). This is the simplest configuration used to establish
224 baseline single-thread single-core application packet processing and forwarding
225 performance. Subsequent releases of CSIT will add performance tests with Intel
226 Hyper-Threading Enabled (requires BIOS settings change and hard reboot of
227 server).
228
229 **Multi-core Tests** - CSIT |release| multi-core tests are executed in the
230 following VPP thread and core configurations:
231
232 #. 1t1c - 1 VPP worker thread on 1 CPU physical core.
233 #. 2t2c - 2 VPP worker threads on 2 CPU physical cores.
234
235 VPP worker threads are the data plane threads. VPP control thread is running on
236 a separate non-isolated core together with other Linux processes. Note that in
237 quite a few test cases running VPP workers on 2 physical cores hits the tested
238 NIC I/O bandwidth or packets-per-second limit.
239
240 Methodology: Packet Throughput
241 ------------------------------
242
243 Following values are measured and reported for packet throughput tests:
244
245 - NDR binary search per :rfc:`2544`:
246
247   - Packet rate: "RATE: <aggregate packet rate in packets-per-second> pps
248     (2x <per direction packets-per-second>)"
249   - Aggregate bandwidth: "BANDWIDTH: <aggregate bandwidth in Gigabits per
250     second> Gbps (untagged)"
251
252 - PDR binary search per :rfc:`2544`:
253
254   - Packet rate: "RATE: <aggregate packet rate in packets-per-second> pps (2x
255     <per direction packets-per-second>)"
256   - Aggregate bandwidth: "BANDWIDTH: <aggregate bandwidth in Gigabits per
257     second> Gbps (untagged)"
258   - Packet loss tolerance: "LOSS_ACCEPTANCE <accepted percentage of packets
259     lost at PDR rate>""
260
261 - NDR and PDR are measured for the following L2 frame sizes:
262
263   - IPv4: 64B, IMIX_v4_1 (28x64B,16x570B,4x1518B), 1518B, 9000B.
264   - IPv6: 78B, 1518B, 9000B.
265
266 All rates are reported from external Traffic Generator perspective.
267
268 Methodology: Packet Latency
269 ---------------------------
270
271 TRex Traffic Generator (TG) is used for measuring latency of VPP DUTs. Reported
272 latency values are measured using following methodology:
273
274 - Latency tests are performed at 10%, 50% of discovered NDR rate (non drop rate)
275   for each NDR throughput test and packet size (except IMIX).
276 - TG sends dedicated latency streams, one per direction, each at the rate of
277   10kpps at the prescribed packet size; these are sent in addition to the main
278   load streams.
279 - TG reports min/avg/max latency values per stream direction, hence two sets
280   of latency values are reported per test case; future release of TRex is
281   expected to report latency percentiles.
282 - Reported latency values are aggregate across two SUTs due to three node
283   topology used for all performance tests; for per SUT latency, reported value
284   should be divided by two.
285 - 1usec is the measurement accuracy advertised by TRex TG for the setup used in
286   FD.io labs used by CSIT project.
287 - TRex setup introduces an always-on error of about 2*2usec per latency flow -
288   additonal Tx/Rx interface latency induced by TRex SW writing and reading
289   packet timestamps on CPU cores without HW acceleration on NICs closer to the
290   interface line.
291
292
293 Methodology: KVM VM vhost
294 -------------------------
295
296 CSIT |release| introduced test environment configuration changes to KVM Qemu
297 vhost-user tests in order to more representatively measure |vpp-release|
298 performance in configurations with vhost-user interfaces and different Qemu
299 settings.
300
301 FD.io CSIT performance lab is testing VPP vhost with KVM VMs using following
302 environment settings:
303
304 - Tests with varying Qemu virtio queue (a.k.a. vring) sizes: [vr256] default 256
305   descriptors, [vr1024] 1024 descriptors to optimize for packet throughput;
306
307 - Tests with varying Linux :abbr:`CFS (Completely Fair Scheduler)` settings:
308   [cfs] default settings, [cfsrr1] CFS RoundRobin(1) policy applied to all data
309   plane threads handling test packet path including all VPP worker threads and
310   all Qemu testpmd poll-mode threads;
311
312 - Resulting test cases are all combinations with [vr256,vr1024] and
313   [cfs,cfsrr1] settings;
314
315 - Adjusted Linux kernel :abbr:`CFS (Completely Fair Scheduler)` scheduler policy
316   for data plane threads used in CSIT is documented in
317   `CSIT Performance Environment Tuning wiki <https://wiki.fd.io/view/CSIT/csit-perf-env-tuning-ubuntu1604>`_.
318   The purpose is to verify performance impact (NDR, PDR throughput) and
319   same test measurements repeatability, by making VPP and VM data plane
320   threads less susceptible to other Linux OS system tasks hijacking CPU
321   cores running those data plane threads.
322
323 Methodology: LXC and Docker Containers memif
324 --------------------------------------------
325
326 CSIT |release| introduced additional tests taking advantage of VPP memif
327 virtual interface (shared memory interface) tests to interconnect VPP
328 instances. VPP vswitch instance runs in bare-metal user-mode handling
329 Intel x520 NIC 10GbE interfaces and connecting over memif (Master side)
330 virtual interfaces to more instances of VPP running in :abbr:`LXC (Linux
331 Container)` or in Docker Containers,  both with memif virtual interfaces
332 (Slave side). LXCs and Docker Containers run in a priviliged mode with
333 VPP data plane worker threads pinned to dedicated physical CPU cores per
334 usual CSIT practice. All VPP instances run the same version of software.
335 This test topology is equivalent to existing tests with vhost-user and
336 VMs as described earlier in :ref:`tested_physical_topologies`.
337
338 More information about CSIT LXC and Docker Container setup and control
339 is available in :ref:`containter_orchestration_in_csit`.
340
341 Methodology: Container Topologies Orchestrated by K8s
342 -----------------------------------------------------
343
344 CSIT |release| introduced new tests of Container topologies connected
345 over the memif virtual interface (shared memory interface). In order to
346 provide simple topology coding flexibility and extensibility container
347 orchestration is done with `Kubernetes <https://github.com/kubernetes>`_
348 using `Docker <https://github.com/docker>`_ images for all container
349 applications including VPP. `Ligato <https://github.com/ligato>`_ is
350 used to address the container networking orchestration that is
351 integrated with K8s, including memif support.
352
353 For these tests VPP vswitch instance runs in a Docker Container handling
354 Intel x520 NIC 10GbE interfaces and connecting over memif (Master side)
355 virtual interfaces to more instances of VPP running in Docker Containers
356 with memif virtual interfaces (Slave side). All Docker Containers run in
357 a priviliged mode with VPP data plane worker threads pinned to dedicated
358 physical CPU cores per usual CSIT practice. All VPP instances run the
359 same version of software. This test topology is equivalent to existing
360 tests with vhost-user and VMs as described earlier in
361 :ref:`tested_physical_topologies`.
362
363 More information about CSIT Container Topologies Orchestrated by K8s is
364 available in :ref:`containter_orchestration_in_csit`.
365
366 Methodology: IPSec with Intel QAT HW cards
367 ------------------------------------------
368
369 VPP IPSec performance tests are using DPDK cryptodev device driver in
370 combination with HW cryptodev devices - Intel QAT 8950 50G - present in
371 LF FD.io physical testbeds. DPDK cryptodev can be used for all IPSec
372 data plane functions supported by VPP.
373
374 Currently CSIT |release| implements following IPSec test cases:
375
376 - AES-GCM, CBC-SHA1 ciphers, in combination with IPv4 routed-forwarding
377   with Intel xl710 NIC.
378 - CBC-SHA1 ciphers, in combination with LISP-GPE overlay tunneling for
379   IPv4-over-IPv4 with Intel xl710 NIC.
380
381 Methodology: TRex Traffic Generator Usage
382 -----------------------------------------
383
384 The `TRex traffic generator <https://wiki.fd.io/view/TRex>`_ is used for all
385 CSIT performance tests. TRex stateless mode is used to measure NDR and PDR
386 throughputs using binary search (NDR and PDR discovery tests) and for quick
387 checks of DUT performance against the reference NDRs (NDR check tests) for
388 specific configuration.
389
390 TRex is installed and run on the TG compute node. The typical procedure is:
391
392 - If the TRex is not already installed on TG, it is installed in the
393   suite setup phase - see `TRex intallation`_.
394 - TRex configuration is set in its configuration file
395   ::
396
397   /etc/trex_cfg.yaml
398
399 - TRex is started in the background mode
400   ::
401
402   $ sh -c 'cd /opt/trex-core-2.25/scripts/ && sudo nohup ./t-rex-64 -i -c 7 --iom 0 > /dev/null 2>&1 &' > /dev/null
403
404 - There are traffic streams dynamically prepared for each test, based on traffic
405   profiles. The traffic is sent and the statistics obtained using
406   :command:`trex_stl_lib.api.STLClient`.
407
408 **Measuring packet loss**
409
410 - Create an instance of STLClient
411 - Connect to the client
412 - Add all streams
413 - Clear statistics
414 - Send the traffic for defined time
415 - Get the statistics
416
417 If there is a warm-up phase required, the traffic is sent also before test and
418 the statistics are ignored.
419
420 **Measuring latency**
421
422 If measurement of latency is requested, two more packet streams are created (one
423 for each direction) with TRex flow_stats parameter set to STLFlowLatencyStats. In
424 that case, returned statistics will also include min/avg/max latency values.