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