4 Multi-Core and Multi-Threading
5 ------------------------------
7 **Intel Hyper-Threading** - CSIT |release| performance tests are executed with
8 SUT servers' Intel XEON processors configured in Intel Hyper-Threading Disabled
9 mode (BIOS setting). This is the simplest configuration used to establish
10 baseline single-thread single-core application packet processing and forwarding
11 performance. Subsequent releases of CSIT will add performance tests with Intel
12 Hyper-Threading Enabled (requires BIOS settings change and hard reboot of
15 **Multi-core Tests** - CSIT |release| multi-core tests are executed in the
16 following VPP thread and core configurations:
18 #. 1t1c - 1 VPP worker thread on 1 CPU physical core.
19 #. 2t2c - 2 VPP worker threads on 2 CPU physical cores.
20 #. 4t4c - 4 VPP worker threads on 4 CPU physical cores.
22 VPP worker threads are the data plane threads. VPP control thread is
23 running on a separate non-isolated core together with other Linux
24 processes. Note that in quite a few test cases running VPP workers on 2
25 or 4 physical cores hits the I/O bandwidth or packets-per-second limit
28 Section :ref:`throughput_speedup_multi_core` includes a set of graphs
29 illustrating packet throughout speedup when running VPP on multiple
35 Following values are measured and reported for packet throughput tests:
37 - NDR binary search per :rfc:`2544`:
39 - Packet rate: "RATE: <aggregate packet rate in packets-per-second> pps
40 (2x <per direction packets-per-second>)";
41 - Aggregate bandwidth: "BANDWIDTH: <aggregate bandwidth in Gigabits per
42 second> Gbps (untagged)";
44 - PDR binary search per :rfc:`2544`:
46 - Packet rate: "RATE: <aggregate packet rate in packets-per-second> pps (2x
47 <per direction packets-per-second>)";
48 - Aggregate bandwidth: "BANDWIDTH: <aggregate bandwidth in Gigabits per
49 second> Gbps (untagged)";
50 - Packet loss tolerance: "LOSS_ACCEPTANCE <accepted percentage of packets
53 - NDR and PDR are measured for the following L2 frame sizes (untagged
56 - IPv4 payload: 64B, IMIX_v4_1 (28x64B,16x570B,4x1518B), 1518B, 9000B;
57 - IPv6 payload: 78B, 1518B, 9000B;
59 - NDR and PDR binary search resolution is determined by the final value of the
60 rate change, referred to as the final step:
62 - The final step is set to 50kpps for all NIC to NIC tests and all L2
63 frame sizes except 9000B (changed from 100kpps used in previous
66 - The final step is set to 10kpps for all remaining tests, including 9000B
67 and all vhost VM and memif Container tests.
69 All rates are reported from external Traffic Generator perspective.
71 Maximum Receive Rate (MRR)
72 --------------------------
74 MRR tests measure the packet forwarding rate under the maximum
75 load offered by traffic generator over a set trial duration,
76 regardless of packet loss. Maximum load for specified Ethernet frame
77 size is set to the bi-directional link rate.
79 Current parameters for MRR tests:
81 - Ethernet frame sizes: 64B (78B for IPv6 tests) for all tests, IMIX for
82 selected tests (vhost, memif); all quoted sizes include frame CRC, but
83 exclude per frame transmission overhead of 20B (preamble, inter frame
86 - Maximum load offered: 10GE and 40GE link (sub-)rates depending on NIC
87 tested, with the actual packet rate depending on frame size,
88 transmission overhead and traffic generator NIC forwarding capacity.
90 - For 10GE NICs the maximum packet rate load is 2* 14.88 Mpps for 64B,
91 a 10GE bi-directional link rate.
92 - For 40GE NICs the maximum packet rate load is 2* 18.75 Mpps for 64B,
93 a 40GE bi-directional link sub-rate limited by TG 40GE NIC used,
96 - Trial duration: 10sec.
98 Similarly to NDR/PDR throughput tests, MRR test should be reporting bi-
99 directional link rate (or NIC rate, if lower) if tested VPP
100 configuration can handle the packet rate higher than bi-directional link
101 rate, e.g. large packet tests and/or multi-core tests.
103 MRR tests are used for continuous performance trending and for
104 comparison between releases.
109 TRex Traffic Generator (TG) is used for measuring latency of VPP DUTs. Reported
110 latency values are measured using following methodology:
112 - Latency tests are performed at 10%, 50% of discovered NDR rate (non drop rate)
113 for each NDR throughput test and packet size (except IMIX).
114 - TG sends dedicated latency streams, one per direction, each at the rate of
115 10kpps at the prescribed packet size; these are sent in addition to the main
117 - TG reports min/avg/max latency values per stream direction, hence two sets
118 of latency values are reported per test case; future release of TRex is
119 expected to report latency percentiles.
120 - Reported latency values are aggregate across two SUTs due to three node
121 topology used for all performance tests; for per SUT latency, reported value
122 should be divided by two.
123 - 1usec is the measurement accuracy advertised by TRex TG for the setup used in
124 FD.io labs used by CSIT project.
125 - TRex setup introduces an always-on error of about 2*2usec per latency flow -
126 additonal Tx/Rx interface latency induced by TRex SW writing and reading
127 packet timestamps on CPU cores without HW acceleration on NICs closer to the
130 vhostuser with KVM VMs
131 ----------------------
133 FD.io CSIT performance lab is testing VPP vhost with KVM VMs using following
134 environment settings:
136 - Tests with varying Qemu virtio queue (a.k.a. vring) sizes: [vr256] default 256
137 descriptors, [vr1024] 1024 descriptors to optimize for packet throughput.
139 - Tests with varying Linux :abbr:`CFS (Completely Fair Scheduler)` settings:
140 [cfs] default settings, [cfsrr1] CFS RoundRobin(1) policy applied to all data
141 plane threads handling test packet path including all VPP worker threads and
142 all Qemu testpmd poll-mode threads.
144 - Resulting test cases are all combinations with [vr256,vr1024] and
145 [cfs,cfsrr1] settings.
147 - Adjusted Linux kernel :abbr:`CFS (Completely Fair Scheduler)` scheduler policy
148 for data plane threads used in CSIT is documented in
149 `CSIT Performance Environment Tuning wiki <https://wiki.fd.io/view/CSIT/csit-perf-env-tuning-ubuntu1604>`_.
150 The purpose is to verify performance impact (MRR and NDR/PDR
151 throughput) and same test measurements repeatability, by making VPP
152 and VM data plane threads less susceptible to other Linux OS system
153 tasks hijacking CPU cores running those data plane threads.
155 Memif with LXC and Docker Containers
156 ------------------------------------
158 CSIT |release| includes tests taking advantage of VPP memif virtual
159 interface (shared memory interface) to interconnect VPP running in
160 Containers. VPP vswitch instance runs in bare-metal user-mode handling
161 NIC interfaces and connecting over memif (Slave side) to VPPs running in
162 :abbr:`Linux Container (LXC)` or in Docker Container (DRC) configured
163 with memif (Master side). LXCs and DRCs run in a priviliged mode with
164 VPP data plane worker threads pinned to dedicated physical CPU cores per
165 usual CSIT practice. All VPP instances run the same version of software.
166 This test topology is equivalent to existing tests with vhost-user and
167 VMs as described earlier in :ref:`tested_physical_topologies`.
169 More information about CSIT LXC and DRC setup and control is available
170 in :ref:`container_orchestration_in_csit`.
172 Memif with K8s Pods/Containers
173 ------------------------------
175 CSIT |release| includes tests of VPP topologies running in K8s
176 orchestrated Pods/Containers and connected over memif virtual
177 interfaces. In order to provide simple topology coding flexibility and
178 extensibility container orchestration is done with `Kubernetes
179 <https://github.com/kubernetes>`_ using `Docker
180 <https://github.com/docker>`_ images for all container applications
181 including VPP. `Ligato <https://github.com/ligato>`_ is used for the
182 Pod/Container networking orchestration that is integrated with K8s,
183 including memif support.
185 In these tests VPP vswitch runs in a K8s Pod with Docker Container (DRC)
186 handling NIC interfaces and connecting over memif to more instances of
187 VPP running in Pods/DRCs. All DRCs run in a priviliged mode with VPP
188 data plane worker threads pinned to dedicated physical CPU cores per
189 usual CSIT practice. All VPP instances run the same version of software.
190 This test topology is equivalent to existing tests with vhost-user and
191 VMs as described earlier in :ref:`tested_physical_topologies`.
193 Further documentation is available in
194 :ref:`container_orchestration_in_csit`.
196 IPSec with Intel QAT HW cards
197 -----------------------------
199 VPP IPSec performance tests are using DPDK cryptodev device driver in
200 combination with HW cryptodev devices - Intel QAT 8950 50G - present in
201 LF FD.io physical testbeds. DPDK cryptodev can be used for all IPSec
202 data plane functions supported by VPP.
204 Currently CSIT |release| implements following IPSec test cases:
206 - AES-GCM, CBC-SHA1 ciphers, in combination with IPv4 routed-forwarding
207 with Intel xl710 NIC.
208 - CBC-SHA1 ciphers, in combination with LISP-GPE overlay tunneling for
209 IPv4-over-IPv4 with Intel xl710 NIC.
211 TRex Traffic Generator Usage
212 ----------------------------
214 `TRex traffic generator <https://wiki.fd.io/view/TRex>`_ is used for all
215 CSIT performance tests. TRex stateless mode is used to measure NDR and PDR
216 throughputs using binary search (NDR and PDR discovery tests) and for quick
217 checks of DUT performance against the reference NDRs (NDR check tests) for
218 specific configuration.
220 TRex is installed and run on the TG compute node. The typical procedure is:
222 - If the TRex is not already installed on TG, it is installed in the
223 suite setup phase - see `TRex intallation`_.
224 - TRex configuration is set in its configuration file
229 - TRex is started in the background mode
232 $ sh -c 'cd <t-rex-install-dir>/scripts/ && sudo nohup ./t-rex-64 -i -c 7 --iom 0 > /tmp/trex.log 2>&1 &' > /dev/null
234 - There are traffic streams dynamically prepared for each test, based on traffic
235 profiles. The traffic is sent and the statistics obtained using
236 :command:`trex_stl_lib.api.STLClient`.
238 **Measuring packet loss**
240 - Create an instance of STLClient
241 - Connect to the client
244 - Send the traffic for defined time
247 If there is a warm-up phase required, the traffic is sent also before test and
248 the statistics are ignored.
250 **Measuring latency**
252 If measurement of latency is requested, two more packet streams are created (one
253 for each direction) with TRex flow_stats parameter set to STLFlowLatencyStats. In
254 that case, returned statistics will also include min/avg/max latency values.
256 TCP/IP tests with WRK tool
257 --------------------------
259 `WRK HTTP benchmarking tool <https://github.com/wg/wrk>`_ is used for
260 experimental TCP/IP and HTTP tests of VPP TCP/IP stack and built-in
261 static HTTP server. WRK has been chosen as it is capable of generating
262 significant TCP/IP and HTTP loads by scaling number of threads across
263 multi-core processors.
265 This in turn enables quite high scale benchmarking of the main TCP/IP
266 and HTTP service including HTTP TCP/IP Connections-Per-Second (CPS),
267 HTTP Requests-Per-Second and HTTP Bandwidth Throughput.
269 The initial tests are designed as follows:
271 - HTTP and TCP/IP Connections-Per-Second (CPS)
273 - WRK configured to use 8 threads across 8 cores, 1 thread per core.
274 - Maximum of 50 concurrent connections across all WRK threads.
275 - Timeout for server responses set to 5 seconds.
276 - Test duration is 30 seconds.
277 - Expected HTTP test sequence:
279 - Single HTTP GET Request sent per open connection.
280 - Connection close after valid HTTP reply.
281 - Resulting flow sequence - 8 packets: >S,<S-A,>A,>Req,<Rep,>F,<F,> A.
283 - HTTP Requests-Per-Second
285 - WRK configured to use 8 threads across 8 cores, 1 thread per core.
286 - Maximum of 50 concurrent connections across all WRK threads.
287 - Timeout for server responses set to 5 seconds.
288 - Test duration is 30 seconds.
289 - Expected HTTP test sequence:
291 - Multiple HTTP GET Requests sent in sequence per open connection.
292 - Connection close after set test duration time.
293 - Resulting flow sequence: >S,<S-A,>A,>Req[1],<Rep[1],..,>Req[n],<Rep[n],>F,<F,>A.