CSIT rls1704 report - update to handcraftec sections:
[csit.git] / docs / report / vpp_performance_tests / overview.rst
1 Overview\r
2 ========\r
3 \r
4 Tested Physical Topologies\r
5 --------------------------\r
6 \r
7 CSIT VPP performance tests are executed on physical baremetal servers hosted by LF\r
8 FD.io project. Testbed physical topology is shown in the figure below.\r
9 \r
10 ::\r
11 \r
12     +------------------------+           +------------------------+\r
13     |                        |           |                        |\r
14     |  +------------------+  |           |  +------------------+  |\r
15     |  |                  |  |           |  |                  |  |\r
16     |  |                  <----------------->                  |  |\r
17     |  |       DUT1       |  |           |  |       DUT2       |  |\r
18     |  +--^---------------+  |           |  +---------------^--+  |\r
19     |     |                  |           |                  |     |\r
20     |     |            SUT1  |           |  SUT2            |     |\r
21     +------------------------+           +------------------^-----+\r
22           |                                                 |\r
23           |                                                 |\r
24           |                  +-----------+                  |\r
25           |                  |           |                  |\r
26           +------------------>    TG     <------------------+\r
27                              |           |\r
28                              +-----------+\r
29 \r
30 SUT1 and SUT2 are two System Under Test servers (Cisco UCS C240, each with two\r
31 Intel XEON CPUs), TG is a Traffic Generator (TG, another Cisco UCS C240, with\r
32 two Intel XEON CPUs). SUTs run VPP SW application in Linux user-mode as a\r
33 Device Under Test (DUT). TG runs TRex SW application as a packet Traffic\r
34 Generator. Physical connectivity between SUTs and to TG is provided using\r
35 different NIC models that need to be tested for performance. Currently\r
36 installed and tested NIC models include:\r
37 \r
38 #. 2port10GE X520-DA2 Intel.\r
39 #. 2port10GE X710 Intel.\r
40 #. 2port10GE VIC1227 Cisco.\r
41 #. 2port40GE VIC1385 Cisco.\r
42 #. 2port40GE XL710 Intel.\r
43 \r
44 From SUT and DUT perspective, all performance tests involve forwarding packets\r
45 between two physical Ethernet ports (10GE or 40GE). Due to the number of\r
46 listed NIC models tested and available PCI slot capacity in SUT servers, in\r
47 all of the above cases both physical ports are located on the same NIC. In\r
48 some test cases this results in measured packet throughput being limited not\r
49 by VPP DUT but by either the physical interface or the NIC capacity.\r
50 \r
51 Going forward CSIT project will be looking to add more hardware into FD.io\r
52 performance labs to address larger scale multi-interface and multi-NIC\r
53 performance testing scenarios.\r
54 \r
55 For test cases that require DUT (VPP) to communicate with VM(s) over vhost-user\r
56 interfaces, N of VM instances are created on SUT1 and SUT2. For N=1 DUT (VPP) forwards packets between vhostuser and physical interfaces. For N>1 DUT (VPP) a logical service chain forwarding topology is created on DUT (VPP) by applying L2 or IPv4/IPv6 configuration depending on the test suite.\r
57 DUT (VPP) test topology with N VM instances\r
58 is shown in the figure below including applicable packet flow thru the DUTs and VMs\r
59 (marked in the figure with ``***``).\r
60 \r
61 ::\r
62 \r
63     +-------------------------+           +-------------------------+\r
64     | +---------+ +---------+ |           | +---------+ +---------+ |\r
65     | |  VM[1]  | |  VM[N]  | |           | |  VM[1]  | |  VM[N]  | |\r
66     | |  *****  | |  *****  | |           | |  *****  | |  *****  | |\r
67     | +--^---^--+ +--^---^--+ |           | +--^---^--+ +--^---^--+ |\r
68     |   *|   |*     *|   |*   |           |   *|   |*     *|   |*   |\r
69     | +--v---v-------v---v--+ |           | +--v---v-------v---v--+ |\r
70     | |  *   *       *   *  |*|***********|*|  *   *       *   *  | |\r
71     | |  *   *********   ***<-|-----------|->***   *********   *  | |\r
72     | |  *    DUT1          | |           | |       DUT2       *  | |\r
73     | +--^------------------+ |           | +------------------^--+ |\r
74     |   *|                    |           |                    |*   |\r
75     |   *|            SUT1    |           |  SUT2              |*   |\r
76     +-------------------------+           +-------------------------+\r
77         *|                                                     |*\r
78         *|                                                     |*\r
79         *|                    +-----------+                    |*\r
80         *|                    |           |                    |*\r
81         *+-------------------->    TG     <--------------------+*\r
82         **********************|           |**********************\r
83                               +-----------+\r
84 \r
85 For VM tests, packets are switched by DUT (VPP) multiple times: twice for a single VM, three times for two VMs, N+1 times for N VMs.\r
86 Hence the external\r
87 throughput rates measured by TG and listed in this report must be multiplied\r
88 by (N+1) to represent the actual DUT aggregate packet forwarding rate.\r
89 \r
90 CSIT |release|\r
91 \r
92 Note that reported VPP performance results are specific to the SUTs tested.\r
93 Current LF FD.io SUTs are based on Intel XEON E5-2699v3 2.3GHz CPUs. SUTs with\r
94 other CPUs are likely to yield different results. A good rule of thumb, that\r
95 can be applied to estimate VPP packet thoughput for Phy-to-Phy (NIC-to-NIC,\r
96 PCI-to-PCI) topology, is to expect the forwarding performance to be\r
97 proportional to CPU core frequency, assuming CPU is the only limiting factor\r
98 and all other SUT parameters equivalent to FD.io CSIT environment. The same rule of\r
99 thumb can be also applied for Phy-to-VM-to-Phy (NIC-to-VM-to-NIC) topology,\r
100 but due to much higher dependency on intensive memory operations and\r
101 sensitivity to Linux kernel scheduler settings and behaviour, this estimation\r
102 may not always yield good enough accuracy.\r
103 \r
104 For detailed LF FD.io test bed specification and physical topology please refer to `LF FDio CSIT testbed wiki page <https://wiki.fd.io/view/CSIT/CSIT_LF_testbed>`_.\r
105 \r
106 Performance Tests Coverage\r
107 --------------------------\r
108 \r
109 Performance tests are split into the two main categories:\r
110 \r
111 - Throughput discovery - discovery of packet forwarding rate using binary search\r
112   in accordance to RFC2544.\r
113 \r
114   - NDR - discovery of Non Drop Rate packet throughput, at zero packet loss;\r
115     followed by one-way packet latency measurements at 10%, 50% and 100% of\r
116     discovered NDR throughput.\r
117   - PDR - discovery of Partial Drop Rate, with specified non-zero packet loss\r
118     currently set to 0.5%; followed by one-way packet latency measurements at\r
119     100% of discovered PDR throughput.\r
120 \r
121 - Throughput verification - verification of packet forwarding rate against\r
122   previously discovered throughput rate. These tests are currently done against\r
123   0.9 of reference NDR, with reference rates updated periodically.\r
124 \r
125 CSIT |release| includes following performance test suites, listed per NIC type:\r
126 \r
127 - 2port10GE X520-DA2 Intel\r
128 \r
129   - **L2XC** - L2 Cross-Connect switched-forwarding of untagged, dot1q, dot1ad\r
130     VLAN tagged Ethernet frames.\r
131   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames\r
132     with MAC learning; disabled MAC learning i.e. static MAC tests to be added.\r
133   - **IPv4** - IPv4 routed-forwarding.\r
134   - **IPv6** - IPv6 routed-forwarding.\r
135   - **IPv4 Scale** - IPv4 routed-forwarding with 20k, 200k and 2M FIB entries.\r
136   - **IPv6 Scale** - IPv6 routed-forwarding with 20k, 200k and 2M FIB entries.\r
137   - **VM with vhost-user** - switching between NIC ports and VM over vhost-user\r
138     interfaces in different switching modes incl. L2 Cross-Connect, L2\r
139     Bridge-Domain, VXLAN with L2BD, IPv4 routed-forwarding.\r
140   - **COP** - IPv4 and IPv6 routed-forwarding with COP address security.\r
141   - **iACL** - IPv4 and IPv6 routed-forwarding with iACL address security.\r
142   - **LISP** - LISP overlay tunneling for IPv4-over-IPV4, IPv6-over-IPv4,\r
143     IPv6-over-IPv6, IPv4-over-IPv6 in IPv4 and IPv6 routed-forwarding modes.\r
144   - **VXLAN** - VXLAN overlay tunnelling integration with L2XC and L2BD.\r
145   - **QoS Policer** - ingress packet rate measuring, marking and limiting\r
146     (IPv4).\r
147 \r
148 - 2port40GE XL710 Intel\r
149 \r
150   - **L2XC** - L2 Cross-Connect switched-forwarding of untagged Ethernet frames.\r
151   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames\r
152     with MAC learning.\r
153   - **IPv4** - IPv4 routed-forwarding.\r
154   - **IPv6** - IPv6 routed-forwarding.\r
155   - **VM with vhost-user** - switching between NIC ports and VM over vhost-user\r
156     interfaces in different switching modes incl. L2 Bridge-Domain.\r
157 \r
158 - 2port10GE X710 Intel\r
159 \r
160   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames\r
161     with MAC learning.\r
162   - **VM with vhost-user** - switching between NIC ports and VM over vhost-user\r
163     interfaces in different switching modes incl. L2 Bridge-Domain.\r
164 \r
165 - 2port10GE VIC1227 Cisco\r
166 \r
167   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames\r
168     with MAC learning.\r
169 \r
170 - 2port40GE VIC1385 Cisco\r
171 \r
172   - **L2BD** - L2 Bridge-Domain switched-forwarding of untagged Ethernet frames\r
173      with MAC learning.\r
174 \r
175 Execution of performance tests takes time, especially the throughput discovery\r
176 tests. Due to limited HW testbed resources available within FD.io labs hosted\r
177 by Linux Foundation, the number of tests for NICs other than X520 (a.k.a.\r
178 Niantic) has been limited to few baseline tests. Over time we expect the HW\r
179 testbed resources to grow, and will be adding complete set of performance\r
180 tests for all models of hardware to be executed regularly and(or)\r
181 continuously.\r
182 \r
183 Performance Tests Naming\r
184 ------------------------\r
185 \r
186 CSIT |release| follows a common structured naming convention for all\r
187 performance and system functional tests, introduced in CSIT rls1701.\r
188 \r
189 The naming should be intuitive for majority of the tests. Complete\r
190 description of CSIT test naming convention is provided on `CSIT test naming wiki\r
191 <https://wiki.fd.io/view/CSIT/csit-test-naming>`_.\r
192 \r
193 Here few illustrative examples of the new naming usage for performance test\r
194 suites:\r
195 \r
196 #. **Physical port to physical port - a.k.a. NIC-to-NIC, Phy-to-Phy, P2P**\r
197 \r
198     - *PortNICConfig-WireEncapsulation-PacketForwardingFunction-\r
199       PacketProcessingFunction1-...-PacketProcessingFunctionN-TestType*\r
200     - *10ge2p1x520-dot1q-l2bdbasemaclrn-ndrdisc.robot* => 2 ports of 10GE on\r
201       Intel x520 NIC, dot1q tagged Ethernet, L2 bridge-domain baseline switching\r
202       with MAC learning, NDR throughput discovery.\r
203     - *10ge2p1x520-ethip4vxlan-l2bdbasemaclrn-ndrchk.robot* => 2 ports of 10GE\r
204       on Intel x520 NIC, IPv4 VXLAN Ethernet, L2 bridge-domain baseline\r
205       switching with MAC learning, NDR throughput discovery.\r
206     - *10ge2p1x520-ethip4-ip4base-ndrdisc.robot* => 2 ports of 10GE on Intel\r
207       x520 NIC, IPv4 baseline routed forwarding, NDR throughput discovery.\r
208     - *10ge2p1x520-ethip6-ip6scale200k-ndrdisc.robot* => 2 ports of 10GE on\r
209       Intel x520 NIC, IPv6 scaled up routed forwarding, NDR throughput\r
210       discovery.\r
211 \r
212 #. **Physical port to VM (or VM chain) to physical port - a.k.a. NIC2VM2NIC,\r
213    P2V2P, NIC2VMchain2NIC, P2V2V2P**\r
214 \r
215     - *PortNICConfig-WireEncapsulation-PacketForwardingFunction-\r
216       PacketProcessingFunction1-...-PacketProcessingFunctionN-VirtEncapsulation-\r
217       VirtPortConfig-VMconfig-TestType*\r
218     - *10ge2p1x520-dot1q-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc.robot* => 2 ports\r
219       of 10GE on Intel x520 NIC, dot1q tagged Ethernet, L2 bridge-domain\r
220       switching to/from two vhost interfaces and one VM, NDR throughput\r
221       discovery.\r
222     - *10ge2p1x520-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-ndrdisc.robot* => 2\r
223       ports of 10GE on Intel x520 NIC, IPv4 VXLAN Ethernet, L2 bridge-domain\r
224       switching to/from two vhost interfaces and one VM, NDR throughput\r
225       discovery.\r
226     - *10ge2p1x520-ethip4vxlan-l2bdbasemaclrn-eth-4vhost-2vm-ndrdisc.robot* => 2\r
227       ports of 10GE on Intel x520 NIC, IPv4 VXLAN Ethernet, L2 bridge-domain\r
228       switching to/from four vhost interfaces and two VMs, NDR throughput\r
229       discovery.\r
230 \r
231 Methodology: Multi-Thread and Multi-Core\r
232 ----------------------------------------\r
233 \r
234 **HyperThreading** - CSIT |release| performance tests are executed with SUT\r
235 servers' Intel XEON CPUs configured in HyperThreading Disabled mode (BIOS\r
236 settings). This is the simplest configuration used to establish baseline\r
237 single-thread single-core SW packet processing and forwarding performance.\r
238 Subsequent releases of CSIT will add performance tests with Intel\r
239 HyperThreading Enabled (requires BIOS settings change and hard reboot).\r
240 \r
241 **Multi-core Test** - CSIT |release| multi-core tests are executed in the\r
242 following VPP thread and core configurations:\r
243 \r
244 #. 1t1c - 1 VPP worker thread on 1 CPU physical core.\r
245 #. 2t2c - 2 VPP worker threads on 2 CPU physical cores.\r
246 \r
247 Note that in quite a few test cases running VPP on 2 physical cores hits\r
248 the tested NIC I/O bandwidth or packets-per-second limit.\r
249 \r
250 Methodology: Packet Throughput\r
251 ------------------------------\r
252 \r
253 Following values are measured and reported for packet throughput tests:\r
254 \r
255 - NDR binary search per RFC2544:\r
256 \r
257   - Packet rate: "RATE: <aggregate packet rate in packets-per-second> pps\r
258     (2x <per direction packets-per-second>)"\r
259   - Aggregate bandwidth: "BANDWIDTH: <aggregate bandwidth in Gigabits per\r
260     second> Gbps (untagged)"\r
261 \r
262 - PDR binary search per RFC2544:\r
263 \r
264   - Packet rate: "RATE: <aggregate packet rate in packets-per-second> pps (2x\r
265     <per direction packets-per-second>)"\r
266   - Aggregate bandwidth: "BANDWIDTH: <aggregate bandwidth in Gigabits per\r
267     second> Gbps (untagged)"\r
268   - Packet loss tolerance: "LOSS_ACCEPTANCE <accepted percentage of packets\r
269     lost at PDR rate>""\r
270 \r
271 - NDR and PDR are measured for the following L2 frame sizes:\r
272 \r
273   - IPv4: 64B, IMIX_v4_1 (28x64B,16x570B,4x1518B), 1518B, 9000B.\r
274   - IPv6: 78B, 1518B, 9000B.\r
275 \r
276 \r
277 Methodology: Packet Latency\r
278 ---------------------------\r
279 \r
280 TRex Traffic Generator (TG) is used for measuring latency of VPP DUTs. Reported\r
281 latency values are measured using following methodology:\r
282 \r
283 - Latency tests are performed at 10%, 50% of discovered NDR rate (non drop rate)\r
284   for each NDR throughput test and packet size (except IMIX).\r
285 - TG sends dedicated latency streams, one per direction, each at the rate of\r
286   10kpps at the prescribed packet size; these are sent in addition to the main\r
287   load streams.\r
288 - TG reports min/avg/max latency values per stream direction, hence two sets\r
289   of latency values are reported per test case; future release of TRex is\r
290   expected to report latency percentiles.\r
291 - Reported latency values are aggregate across two SUTs due to three node\r
292   topology used for all performance tests; for per SUT latency, reported value\r
293   should be divided by two.\r
294 - 1usec is the measurement accuracy advertised by TRex TG for the setup used in\r
295   FD.io labs used by CSIT project.\r
296 - TRex setup introduces an always-on error of about 2*2usec per latency flow -\r
297   additonal Tx/Rx interface latency induced by TRex SW writing and reading\r
298   packet timestamps on CPU cores without HW acceleration on NICs closer to the\r
299   interface line.\r
300 \r
301 \r
302 Methodology: KVM VM vhost\r
303 -------------------------\r
304 \r
305 CSIT |release| introduced environment configuration changes to KVM Qemu vhost-\r
306 user tests in order to more representatively measure VPP-17.01 performance in\r
307 configurations with vhost-user interfaces and VMs.\r
308 \r
309 Current setup of CSIT FD.io performance lab is using tuned settings for more\r
310 optimal performance of KVM Qemu:\r
311 \r
312 - Default Qemu virtio queue size of 256 descriptors.\r
313 - Adjusted Linux kernel CFS scheduler settings, as detailed on this CSIT wiki\r
314   page: https://wiki.fd.io/view/CSIT/csit-perf-env-tuning-ubuntu1604.\r
315 \r
316 Adjusted Linux kernel CFS settings make the NDR and PDR throughput performance\r
317 of VPP+VM system less sensitive to other Linux OS system tasks by reducing\r
318 their interference on CPU cores that are designated for critical software\r
319 tasks under test, namely VPP worker threads in host and Testpmd threads in\r
320 guest dealing with data plan.\r