1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. (c) OPNFV, Intel Corporation, AT&T and others.
7 *****************************
8 VSPERF LEVEL TEST PLAN (LTP)
9 *****************************
15 The objective of the OPNFV project titled
16 **Characterize vSwitch Performance for Telco NFV Use Cases**, is to
17 evaluate the performance of virtual switches to identify its suitability for a
18 Telco Network Function Virtualization (NFV) environment. The intention of this
19 Level Test Plan (LTP) document is to specify the scope, approach, resources,
20 and schedule of the virtual switch performance benchmarking activities in
21 OPNFV. The test cases will be identified in a separate document called the
22 Level Test Design (LTD) document.
24 This document is currently in draft form.
32 =========================
34 The document id will be used to uniquely identify versions of the LTP. The
35 format for the document id will be: OPNFV\_vswitchperf\_LTP\_REL\_STATUS, where
36 by the status is one of: draft, reviewed, corrected or final. The document id
37 for this version of the LTP is: OPNFV\_vswitchperf\_LTP\_Colorado\_REVIEWED.
46 The main purpose of this project is to specify a suite of
47 performance tests in order to objectively measure the current packet
48 transfer characteristics of a virtual switch in the NFVI. The intent of
49 the project is to facilitate the performance testing of any virtual switch.
50 Thus, a generic suite of tests shall be developed, with no hard dependencies to
51 a single implementation. In addition, the test case suite shall be
52 architecture independent.
54 The test cases developed in this project shall not form part of a
55 separate test framework, all of these tests may be inserted into the
56 Continuous Integration Test Framework and/or the Platform Functionality
57 Test Framework - if a vSwitch becomes a standard component of an OPNFV
65 * `RFC 1242 Benchmarking Terminology for Network Interconnection
66 Devices <http://www.ietf.org/rfc/rfc1242.txt>`__
67 * `RFC 2544 Benchmarking Methodology for Network Interconnect
68 Devices <http://www.ietf.org/rfc/rfc2544.txt>`__
69 * `RFC 2285 Benchmarking Terminology for LAN Switching
70 Devices <http://www.ietf.org/rfc/rfc2285.txt>`__
71 * `RFC 2889 Benchmarking Methodology for LAN Switching
72 Devices <http://www.ietf.org/rfc/rfc2889.txt>`__
73 * `RFC 3918 Methodology for IP Multicast
74 Benchmarking <http://www.ietf.org/rfc/rfc3918.txt>`__
75 * `RFC 4737 Packet Reordering
76 Metrics <http://www.ietf.org/rfc/rfc4737.txt>`__
77 * `RFC 5481 Packet Delay Variation Applicability
78 Statement <http://www.ietf.org/rfc/rfc5481.txt>`__
79 * `RFC 6201 Device Reset
80 Characterization <http://tools.ietf.org/html/rfc6201>`__
84 Level in the overall sequence
85 ===============================
86 The level of testing conducted by vswitchperf in the overall testing sequence (among
87 all the testing projects in OPNFV) is the performance benchmarking of a
88 specific component (the vswitch) in the OPNFV platfrom. It's expected that this
89 testing will follow on from the functional and integration testing conducted by
90 other testing projects in OPNFV, namely Functest and Yardstick.
94 Test classes and overall test conditions
95 =========================================
96 A benchmark is defined by the IETF as: A standardized test that serves as a
97 basis for performance evaluation and comparison. It's important to note that
98 benchmarks are not Functional tests. They do not provide PASS/FAIL criteria,
99 and most importantly ARE NOT performed on live networks, or performed with live
102 In order to determine the packet transfer characteristics of a virtual switch,
103 the benchmarking tests will be broken down into the following categories:
105 - **Throughput Tests** to measure the maximum forwarding rate (in
106 frames per second or fps) and bit rate (in Mbps) for a constant load
107 (as defined by `RFC1242 <https://www.rfc-editor.org/rfc/rfc1242.txt>`__)
108 without traffic loss.
109 - **Packet and Frame Delay Tests** to measure average, min and max
110 packet and frame delay for constant loads.
111 - **Stream Performance Tests** (TCP, UDP) to measure bulk data transfer
112 performance, i.e. how fast systems can send and receive data through
114 - **Request/Response Performance** Tests (TCP, UDP) the measure the
115 transaction rate through the virtual switch.
116 - **Packet Delay Tests** to understand latency distribution for
117 different packet sizes and over an extended test run to uncover
119 - **Scalability Tests** to understand how the virtual switch performs
120 as the number of flows, active ports, complexity of the forwarding
121 logic's configuration... it has to deal with increases.
122 - **Control Path and Datapath Coupling** Tests, to understand how
123 closely coupled the datapath and the control path are as well as the
124 effect of this coupling on the performance of the DUT.
125 - **CPU and Memory Consumption Tests** to understand the virtual
126 switch’s footprint on the system, this includes:
128 * CPU core utilization.
129 * CPU cache utilization.
131 * System bus (QPI, PCI, ..) utilization.
132 * Memory lanes utilization.
133 * CPU cycles consumed per packet.
134 * Time To Establish Flows Tests.
136 - **Noisy Neighbour Tests**, to understand the effects of resource
137 sharing on the performance of a virtual switch.
139 **Note:** some of the tests above can be conducted simultaneously where
140 the combined results would be insightful, for example Packet/Frame Delay
149 ===================================
150 Details of the Level Test Plan
151 ===================================
153 This section describes the following items:
154 * Test items and their identifiers (TestItems_)
155 * Test Traceability Matrix (TestMatrix_)
156 * Features to be tested (FeaturesToBeTested_)
157 * Features not to be tested (FeaturesNotToBeTested_)
158 * Approach (Approach_)
159 * Item pass/fail criteria (PassFailCriteria_)
160 * Suspension criteria and resumption requirements (SuspensionResumptionReqs_)
166 Test items and their identifiers
167 ==================================
168 The test item/application vsperf is trying to test are virtual switches and in
169 particular their performance in an nfv environment. vsperf will first try to
170 measure the maximum achievable performance by a virtual switch and then it will
171 focus in on usecases that are as close to real life deployment scenarios as
178 Test Traceability Matrix
179 ==========================
180 vswitchperf leverages the "3x3" matrix (introduced in
181 https://tools.ietf.org/html/draft-ietf-bmwg-virtual-net-02) to achieve test
182 traceability. The matrix was expanded to 3x4 to accommodate scale metrics when
183 displaying the coverage of many metrics/benchmarks). Test case covreage in the
184 LTD is tracked using the following catagories:
187 +---------------+-------------+------------+---------------+-------------+
189 | | SPEED | ACCURACY | RELIABILITY | SCALE |
191 +---------------+-------------+------------+---------------+-------------+
193 | Activation | X | X | X | X |
195 +---------------+-------------+------------+---------------+-------------+
197 | Operation | X | X | X | X |
199 +---------------+-------------+------------+---------------+-------------+
201 | De-activation | | | | |
203 +---------------+-------------+------------+---------------+-------------+
205 X = denotes a test catagory that has 1 or more test cases defined.
209 .. _FeaturesToBeTested:
211 Features to be tested
212 ==========================
214 Characterizing virtual switches (i.e. Device Under Test (DUT) in this document)
215 includes measuring the following performance metrics:
217 - **Throughput** as defined by `RFC1242
218 <https://www.rfc-editor.org/rfc/rfc1242.txt>`__: The maximum rate at which
219 **none** of the offered frames are dropped by the DUT. The maximum frame
220 rate and bit rate that can be transmitted by the DUT without any error
221 should be recorded. Note there is an equivalent bit rate and a specific
222 layer at which the payloads contribute to the bits. Errors and
223 improperly formed frames or packets are dropped.
224 - **Packet delay** introduced by the DUT and its cumulative effect on
225 E2E networks. Frame delay can be measured equivalently.
226 - **Packet delay variation**: measured from the perspective of the
227 VNF/application. Packet delay variation is sometimes called "jitter".
228 However, we will avoid the term "jitter" as the term holds different
229 meaning to different groups of people. In this document we will
230 simply use the term packet delay variation. The preferred form for this
231 metric is the PDV form of delay variation defined in `RFC5481
232 <https://www.rfc-editor.org/rfc/rfc5481.txt>`__. The most relevant
233 measurement of PDV considers the delay variation of a single user flow,
234 as this will be relevant to the size of end-system buffers to compensate
235 for delay variation. The measurement system's ability to store the
236 delays of individual packets in the flow of interest is a key factor
237 that determines the specific measurement method. At the outset, it is
238 ideal to view the complete PDV distribution. Systems that can capture
239 and store packets and their delays have the freedom to calculate the
240 reference minimum delay and to determine various quantiles of the PDV
241 distribution accurately (in post-measurement processing routines).
242 Systems without storage must apply algorithms to calculate delay and
243 statistical measurements on the fly. For example, a system may store
244 temporary estimates of the mimimum delay and the set of (100) packets
245 with the longest delays during measurement (to calculate a high quantile,
246 and update these sets with new values periodically.
247 In some cases, a limited number of delay histogram bins will be
248 available, and the bin limits will need to be set using results from
249 repeated experiments. See section 8 of `RFC5481
250 <https://www.rfc-editor.org/rfc/rfc5481.txt>`__.
251 - **Packet loss** (within a configured waiting time at the receiver): All
252 packets sent to the DUT should be accounted for.
253 - **Burst behaviour**: measures the ability of the DUT to buffer packets.
254 - **Packet re-ordering**: measures the ability of the device under test to
255 maintain sending order throughout transfer to the destination.
256 - **Packet correctness**: packets or Frames must be well-formed, in that
257 they include all required fields, conform to length requirements, pass
258 integrity checks, etc.
259 - **Availability and capacity** of the DUT i.e. when the DUT is fully “up”
260 and connected, following measurements should be captured for
261 DUT without any network packet load:
263 - Includes average power consumption of the CPUs (in various power states) and
264 system over specified period of time. Time period should not be less
266 - Includes average per core CPU utilization over specified period of time.
267 Time period should not be less than 60 seconds.
268 - Includes the number of NIC interfaces supported.
269 - Includes headroom of VM workload processing cores (i.e. available
274 .. _FeaturesNotToBeTested:
276 Features not to be tested
277 ==========================
278 vsperf doesn't intend to define or perform any functional tests. The aim is to
279 focus on performance.
287 The testing approach adoped by the vswitchperf project is black box testing,
288 meaning the test inputs can be generated and the outputs captured and
289 completely evaluated from the outside of the System Under Test. Some metrics
290 can be collected on the SUT, such as cpu or memory utilization if the
291 collection has no/minimal impact on benchmark.
292 This section will look at the deployment scenarios and the general methodology
293 used by vswitchperf. In addition, this section will also specify the details of
294 the Test Report that must be collected for each of the test cases.
299 --------------------------
300 The following represents possible deployment test scenarios which can
301 help to determine the performance of both the virtual switch and the
302 datapaths to physical ports (to NICs) and to logical ports (to VNFs):
308 Physical port → vSwitch → physical port
309 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
310 .. code-block:: console
313 +--------------------------------------------------+ |
314 | +--------------------+ | |
317 | +--------------+ +--------------+ | |
318 | | phy port | vSwitch | phy port | | |
319 +---+--------------+------------+--------------+---+ _|
323 +--------------------------------------------------+
325 | traffic generator |
327 +--------------------------------------------------+
333 Physical port → vSwitch → VNF → vSwitch → physical port
334 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
335 .. code-block:: console
338 +---------------------------------------------------+ |
340 | +-------------------------------------------+ | |
341 | | Application | | |
342 | +-------------------------------------------+ | |
346 | +---------------+ +---------------+ | |
347 | | logical port 0| | logical port 1| | |
348 +---+---------------+-----------+---------------+---+ _|
352 +---+---------------+----------+---------------+---+ |
353 | | logical port 0| | logical port 1| | |
354 | +---------------+ +---------------+ | |
358 | +--------------+ +--------------+ | |
359 | | phy port | vSwitch | phy port | | |
360 +---+--------------+------------+--------------+---+ _|
364 +--------------------------------------------------+
366 | traffic generator |
368 +--------------------------------------------------+
374 Physical port → vSwitch → VNF → vSwitch → VNF → vSwitch → physical port
375 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
377 .. code-block:: console
380 +----------------------+ +----------------------+ |
381 | Guest 1 | | Guest 2 | |
382 | +---------------+ | | +---------------+ | |
383 | | Application | | | | Application | | |
384 | +---------------+ | | +---------------+ | |
386 | | v | | | v | | Guests
387 | +---------------+ | | +---------------+ | |
388 | | logical ports | | | | logical ports | | |
389 | | 0 1 | | | | 0 1 | | |
390 +---+---------------+--+ +---+---------------+--+ _|
394 +---+---------------+---------+---------------+--+ |
395 | | 0 1 | | 3 4 | | |
396 | | logical ports | | logical ports | | |
397 | +---------------+ +---------------+ | |
399 | | L-----------------+ v | |
400 | +--------------+ +--------------+ | |
401 | | phy ports | vSwitch | phy ports | | |
402 +---+--------------+----------+--------------+---+ _|
406 +--------------------------------------------------+
408 | traffic generator |
410 +--------------------------------------------------+
414 Physical port → VNF → vSwitch → VNF → physical port
415 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
417 .. code-block:: console
420 +----------------------+ +----------------------+ |
421 | Guest 1 | | Guest 2 | |
422 |+-------------------+ | | +-------------------+| |
423 || Application | | | | Application || |
424 |+-------------------+ | | +-------------------+| |
425 | ^ | | | ^ | | | Guests
427 |+-------------------+ | | +-------------------+| |
428 || logical ports | | | | logical ports || |
429 || 0 1 | | | | 0 1 || |
430 ++--------------------++ ++--------------------++ _|
432 (PCI passthrough) | | (PCI passthrough)
434 +--------++------------+-+------------++---------+ |
435 | | || 0 | | 1 || | | |
436 | | ||logical port| |logical port|| | | |
437 | | |+------------+ +------------+| | | |
439 | | | L-----------------+ | | | |
441 | | | vSwitch | | | |
442 | | +-----------------------------+ | | |
445 | +--------------+ +--------------+ | |
446 | | phy port/VF | | phy port/VF | | |
447 +-+--------------+--------------+--------------+-+ _|
451 +--------------------------------------------------+
453 | traffic generator |
455 +--------------------------------------------------+
459 Physical port → vSwitch → VNF
460 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
462 .. code-block:: console
465 +---------------------------------------------------+ |
467 | +-------------------------------------------+ | |
468 | | Application | | |
469 | +-------------------------------------------+ | |
473 | +---------------+ | |
474 | | logical port 0| | |
475 +---+---------------+-------------------------------+ _|
479 +---+---------------+------------------------------+ |
480 | | logical port 0| | |
481 | +---------------+ | |
485 | +--------------+ | |
486 | | phy port | vSwitch | |
487 +---+--------------+------------ -------------- ---+ _|
491 +--------------------------------------------------+
493 | traffic generator |
495 +--------------------------------------------------+
499 VNF → vSwitch → physical port
500 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
502 .. code-block:: console
505 +---------------------------------------------------+ |
507 | +-------------------------------------------+ | |
508 | | Application | | |
509 | +-------------------------------------------+ | |
513 | +---------------+ | |
514 | | logical port | | |
515 +-------------------------------+---------------+---+ _|
519 +------------------------------+---------------+---+ |
520 | | logical port | | |
521 | +---------------+ | |
525 | +--------------+ | |
526 | vSwitch | phy port | | |
527 +-------------------------------+--------------+---+ _|
531 +--------------------------------------------------+
533 | traffic generator |
535 +--------------------------------------------------+
539 VNF → vSwitch → VNF → vSwitch
540 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
542 .. code-block:: console
545 +-------------------------+ +-------------------------+ |
546 | Guest 1 | | Guest 2 | |
547 | +-----------------+ | | +-----------------+ | |
548 | | Application | | | | Application | | |
549 | +-----------------+ | | +-----------------+ | |
553 | +---------------+ | | +---------------+ | |
554 | | logical port 0| | | | logical port 0| | |
555 +-----+---------------+---+ +---+---------------+-----+ _|
559 +----+---------------+------------+---------------+-----+ |
560 | | port 0 | | port 1 | | |
561 | +---------------+ +---------------+ | |
564 | +--------------------+ | |
567 +-------------------------------------------------------+ _|
571 HOST 1(Physical port → virtual switch → VNF → virtual switch → Physical port)
572 → HOST 2(Physical port → virtual switch → VNF → virtual switch → Physical port)
574 HOST 1 (PVP) → HOST 2 (PVP)
575 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
577 .. code-block:: console
580 +----------------------+ +----------------------+ |
581 | Guest 1 | | Guest 2 | |
582 | +---------------+ | | +---------------+ | |
583 | | Application | | | | Application | | |
584 | +---------------+ | | +---------------+ | |
586 | | v | | | v | | Guests
587 | +---------------+ | | +---------------+ | |
588 | | logical ports | | | | logical ports | | |
589 | | 0 1 | | | | 0 1 | | |
590 +---+---------------+--+ +---+---------------+--+ _|
594 +---+---------------+--+ +---+---------------+--+ |
595 | | 0 1 | | | | 3 4 | | |
596 | | logical ports | | | | logical ports | | |
597 | +---------------+ | | +---------------+ | |
598 | ^ | | | ^ | | | Hosts
600 | +--------------+ | | +--------------+ | |
601 | | phy ports | | | | phy ports | | |
602 +---+--------------+---+ +---+--------------+---+ _|
604 | +-----------------+ |
606 +--------------------------------------------------+
608 | traffic generator |
610 +--------------------------------------------------+
614 **Note:** For tests where the traffic generator and/or measurement
615 receiver are implemented on VM and connected to the virtual switch
616 through vNIC, the issues of shared resources and interactions between
617 the measurement devices and the device under test must be considered.
619 **Note:** Some RFC 2889 tests require a full-mesh sending and receiving
620 pattern involving more than two ports. This possibility is illustrated in the
621 Physical port → vSwitch → VNF → vSwitch → VNF → vSwitch → physical port
622 diagram above (with 2 sending and 2 receiving ports, though all ports
623 could be used bi-directionally).
625 **Note:** When Deployment Scenarios are used in RFC 2889 address learning
626 or cache capacity testing, an additional port from the vSwitch must be
627 connected to the test device. This port is used to listen for flooded
633 --------------------------
634 To establish the baseline performance of the virtual switch, tests would
635 initially be run with a simple workload in the VNF (the recommended
636 simple workload VNF would be `DPDK <http://www.dpdk.org/>`__'s testpmd
637 application forwarding packets in a VM or vloop\_vnf a simple kernel
638 module that forwards traffic between two network interfaces inside the
639 virtualized environment while bypassing the networking stack).
640 Subsequently, the tests would also be executed with a real Telco
641 workload running in the VNF, which would exercise the virtual switch in
642 the context of higher level Telco NFV use cases, and prove that its
643 underlying characteristics and behaviour can be measured and validated.
644 Suitable real Telco workload VNFs are yet to be identified.
648 .. _default-test-parameters:
650 Default Test Parameters
651 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
653 The following list identifies the default parameters for suite of
656 - Reference application: Simple forwarding or Open Source VNF.
657 - Frame size (bytes): 64, 128, 256, 512, 1024, 1280, 1518, 2K, 4k OR
658 Packet size based on use-case (e.g. RTP 64B, 256B) OR Mix of packet sizes as
659 maintained by the Functest project <https://wiki.opnfv.org/traffic_profile_management>.
660 - Reordering check: Tests should confirm that packets within a flow are
662 - Duplex: Unidirectional / Bidirectional. Default: Full duplex with
663 traffic transmitting in both directions, as network traffic generally
664 does not flow in a single direction. By default the data rate of
665 transmitted traffic should be the same in both directions, please
666 note that asymmetric traffic (e.g. downlink-heavy) tests will be
667 mentioned explicitly for the relevant test cases.
668 - Number of Flows: Default for non scalability tests is a single flow.
669 For scalability tests the goal is to test with maximum supported
670 flows but where possible will test up to 10 Million flows. Start with
671 a single flow and scale up. By default flows should be added
672 sequentially, tests that add flows simultaneously will explicitly
673 call out their flow addition behaviour. Packets are generated across
674 the flows uniformly with no burstiness. For multi-core tests should
675 consider the number of packet flows based on vSwitch/VNF multi-thread
676 implementation and behavior.
678 - Traffic Types: UDP, SCTP, RTP, GTP and UDP traffic.
679 - Deployment scenarios are:
680 - Physical → virtual switch → physical.
681 - Physical → virtual switch → VNF → virtual switch → physical.
682 - Physical → virtual switch → VNF → virtual switch → VNF → virtual
684 - Physical → VNF → virtual switch → VNF → physical.
685 - Physical → virtual switch → VNF.
686 - VNF → virtual switch → Physical.
687 - VNF → virtual switch → VNF.
689 Tests MUST have these parameters unless otherwise stated. **Test cases
690 with non default parameters will be stated explicitly**.
692 **Note**: For throughput tests unless stated otherwise, test
693 configurations should ensure that traffic traverses the installed flows
694 through the virtual switch, i.e. flows are installed and have an appropriate
695 time out that doesn't expire before packet transmission starts.
700 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
702 Virtual switches classify packets into flows by processing and matching
703 particular header fields in the packet/frame and/or the input port where
704 the packets/frames arrived. The vSwitch then carries out an action on
705 the group of packets that match the classification parameters. Thus a
706 flow is considered to be a sequence of packets that have a shared set of
707 header field values or have arrived on the same port and have the same
708 action applied to them. Performance results can vary based on the
709 parameters the vSwitch uses to match for a flow. The recommended flow
710 classification parameters for L3 vSwitch performance tests are: the
711 input port, the source IP address, the destination IP address and the
712 Ethernet protocol type field. It is essential to increase the flow
713 time-out time on a vSwitch before conducting any performance tests that
714 do not measure the flow set-up time. Normally the first packet of a
715 particular flow will install the flow in the vSwitch which adds an
716 additional latency, subsequent packets of the same flow are not subject
717 to this latency if the flow is already installed on the vSwitch.
722 ~~~~~~~~~~~~~~~~~~~~~
724 Tests will be assigned a priority in order to determine which tests
725 should be implemented immediately and which tests implementations
728 Priority can be of following types: - Urgent: Must be implemented
729 immediately. - High: Must be implemented in the next release. - Medium:
730 May be implemented after the release. - Low: May or may not be
738 The SUT should be configured to its "default" state. The
739 SUT's configuration or set-up must not change between tests in any way
740 other than what is required to do the test. All supported protocols must
741 be configured and enabled for each test set up.
746 ~~~~~~~~~~~~~~~~~~~~~~~~~~
748 The DUT should be configured with n ports where
749 n is a multiple of 2. Half of the ports on the DUT should be used as
750 ingress ports and the other half of the ports on the DUT should be used
751 as egress ports. Where a DUT has more than 2 ports, the ingress data
752 streams should be set-up so that they transmit packets to the egress
753 ports in sequence so that there is an even distribution of traffic
754 across ports. For example, if a DUT has 4 ports 0(ingress), 1(ingress),
755 2(egress) and 3(egress), the traffic stream directed at port 0 should
756 output a packet to port 2 followed by a packet to port 3. The traffic
757 stream directed at port 1 should also output a packet to port 2 followed
758 by a packet to port 3.
763 ~~~~~~~~~~~~~~~~~~~~~
765 **Frame formats Layer 2 (data link layer) protocols**
769 .. code-block:: console
771 +---------------------------+-----------+
772 | Ethernet Header | Payload | Check Sum |
773 +-----------------+---------+-----------+
774 |_________________|_________|___________|
775 14 Bytes 46 - 1500 4 Bytes
779 **Layer 3 (network layer) protocols**
783 .. code-block:: console
785 +-----------------+-----------+---------+-----------+
786 | Ethernet Header | IP Header | Payload | Checksum |
787 +-----------------+-----------+---------+-----------+
788 |_________________|___________|_________|___________|
789 14 Bytes 20 bytes 26 - 1480 4 Bytes
794 .. code-block:: console
796 +-----------------+-----------+---------+-----------+
797 | Ethernet Header | IP Header | Payload | Checksum |
798 +-----------------+-----------+---------+-----------+
799 |_________________|___________|_________|___________|
800 14 Bytes 40 bytes 26 - 1460 4 Bytes
803 **Layer 4 (transport layer) protocols**
809 .. code-block:: console
811 +-----------------+-----------+-----------------+---------+-----------+
812 | Ethernet Header | IP Header | Layer 4 Header | Payload | Checksum |
813 +-----------------+-----------+-----------------+---------+-----------+
814 |_________________|___________|_________________|_________|___________|
815 14 Bytes 40 bytes 20 Bytes 6 - 1460 4 Bytes
819 **Layer 5 (application layer) protocols**
824 .. code-block:: console
826 +-----------------+-----------+-----------------+---------+-----------+
827 | Ethernet Header | IP Header | Layer 4 Header | Payload | Checksum |
828 +-----------------+-----------+-----------------+---------+-----------+
829 |_________________|___________|_________________|_________|___________|
830 14 Bytes 20 bytes 20 Bytes >= 6 Bytes 4 Bytes
835 ~~~~~~~~~~~~~~~~~~~~~~~~~
836 There is a difference between an Ethernet frame,
837 an IP packet, and a UDP datagram. In the seven-layer OSI model of
838 computer networking, packet refers to a data unit at layer 3 (network
839 layer). The correct term for a data unit at layer 2 (data link layer) is
840 a frame, and at layer 4 (transport layer) is a segment or datagram.
842 Important concepts related to 10GbE performance are frame rate and
843 throughput. The MAC bit rate of 10GbE, defined in the IEEE standard 802
844 .3ae, is 10 billion bits per second. Frame rate is based on the bit rate
845 and frame format definitions. Throughput, defined in IETF RFC 1242, is
846 the highest rate at which the system under test can forward the offered
849 The frame rate for 10GbE is determined by a formula that divides the 10
850 billion bits per second by the preamble + frame length + inter-frame
853 The maximum frame rate is calculated using the minimum values of the
854 following parameters, as described in the IEEE 802 .3ae standard:
856 - Preamble: 8 bytes \* 8 = 64 bits
857 - Frame Length: 64 bytes (minimum) \* 8 = 512 bits
858 - Inter-frame Gap: 12 bytes (minimum) \* 8 = 96 bits
860 Therefore, Maximum Frame Rate (64B Frames)
861 = MAC Transmit Bit Rate / (Preamble + Frame Length + Inter-frame Gap)
862 = 10,000,000,000 / (64 + 512 + 96)
863 = 10,000,000,000 / 672
864 = 14,880,952.38 frame per second (fps)
868 RFCs for testing virtual switch performance
869 --------------------------------------------------
871 The starting point for defining the suite of tests for benchmarking the
872 performance of a virtual switch is to take existing RFCs and standards
873 that were designed to test their physical counterparts and adapting them
874 for testing virtual switches. The rationale behind this is to establish
875 a fair comparison between the performance of virtual and physical
876 switches. This section outlines the RFCs that are used by this
881 RFC 1242 Benchmarking Terminology for Network Interconnection
882 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
883 Devices RFC 1242 defines the terminology that is used in describing
884 performance benchmarking tests and their results. Definitions and
885 discussions covered include: Back-to-back, bridge, bridge/router,
886 constant load, data link frame size, frame loss rate, inter frame gap,
887 latency, and many more.
891 RFC 2544 Benchmarking Methodology for Network Interconnect Devices
892 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
893 RFC 2544 outlines a benchmarking methodology for network Interconnect
894 Devices. The methodology results in performance metrics such as latency,
895 frame loss percentage, and maximum data throughput.
897 In this document network “throughput” (measured in millions of frames
898 per second) is based on RFC 2544, unless otherwise noted. Frame size
899 refers to Ethernet frames ranging from smallest frames of 64 bytes to
900 largest frames of 9K bytes.
904 1. Throughput test defines the maximum number of frames per second
905 that can be transmitted without any error, or 0% loss ratio.
906 In some Throughput tests (and those tests with long duration),
907 evaluation of an additional frame loss ratio is suggested. The
908 current ratio (10^-7 %) is based on understanding the typical
909 user-to-user packet loss ratio needed for good application
910 performance and recognizing that a single transfer through a
911 vswitch must contribute a tiny fraction of user-to-user loss.
912 Further, the ratio 10^-7 % also recognizes practical limitations
913 when measuring loss ratio.
915 2. Latency test measures the time required for a frame to travel from
916 the originating device through the network to the destination device.
917 Please note that RFC2544 Latency measurement will be superseded with
918 a measurement of average latency over all successfully transferred
921 3. Frame loss test measures the network’s
922 response in overload conditions - a critical indicator of the
923 network’s ability to support real-time applications in which a
924 large amount of frame loss will rapidly degrade service quality.
926 4. Burst test assesses the buffering capability of a virtual switch. It
927 measures the maximum number of frames received at full line rate
928 before a frame is lost. In carrier Ethernet networks, this
929 measurement validates the excess information rate (EIR) as defined in
932 5. System recovery to characterize speed of recovery from an overload
935 6. Reset to characterize speed of recovery from device or software
936 reset. This type of test has been updated by `RFC6201
937 <https://www.rfc-editor.org/rfc/rfc6201.txt>`__ as such,
938 the methodology defined by this specification will be that of RFC 6201.
940 Although not included in the defined RFC 2544 standard, another crucial
941 measurement in Ethernet networking is packet delay variation. The
942 definition set out by this specification comes from
943 `RFC5481 <https://www.rfc-editor.org/rfc/rfc5481.txt>`__.
947 RFC 2285 Benchmarking Terminology for LAN Switching Devices
948 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
949 RFC 2285 defines the terminology that is used to describe the
950 terminology for benchmarking a LAN switching device. It extends RFC
951 1242 and defines: DUTs, SUTs, Traffic orientation and distribution,
952 bursts, loads, forwarding rates, etc.
956 RFC 2889 Benchmarking Methodology for LAN Switching
957 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
958 RFC 2889 outlines a benchmarking methodology for LAN switching, it
959 extends RFC 2544. The outlined methodology gathers performance
960 metrics for forwarding, congestion control, latency, address handling
961 and finally filtering.
965 RFC 3918 Methodology for IP Multicast Benchmarking
966 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
967 RFC 3918 outlines a methodology for IP Multicast benchmarking.
971 RFC 4737 Packet Reordering Metrics
972 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
973 RFC 4737 describes metrics for identifying and counting re-ordered
974 packets within a stream, and metrics to measure the extent each
975 packet has been re-ordered.
979 RFC 5481 Packet Delay Variation Applicability Statement
980 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
981 RFC 5481 defined two common, but different forms of delay variation
982 metrics, and compares the metrics over a range of networking
983 circumstances and tasks. The most suitable form for vSwitch
984 benchmarking is the "PDV" form.
988 RFC 6201 Device Reset Characterization
989 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
990 RFC 6201 extends the methodology for characterizing the speed of
991 recovery of the DUT from device or software reset described in RFC
996 .. _PassFailCriteria:
998 Item pass/fail criteria
999 =========================
1001 vswitchperf does not specify Pass/Fail criteria for the tests in terms of a
1002 threshold, as benchmarks do not (and should not do this). The results/metrics
1003 for a test are simply reported. If it had to be defined, a test is considered
1004 to have passed if it succesfully completed and a relavent metric was
1005 recorded/reported for the SUT.
1009 .. _SuspensionResumptionReqs:
1011 Suspension criteria and resumption requirements
1012 ================================================
1013 In the case of a throughput test, a test should be suspended if a virtual
1014 switch is failing to forward any traffic. A test should be restarted from a
1015 clean state if the intention is to carry out the test again.
1019 .. _TestDelierables:
1023 Each test should produce a test report that details SUT information as well as
1024 the test results. There are a number of parameters related to the system, DUT
1025 and tests that can affect the repeatability of a test results and should be
1026 recorded. In order to minimise the variation in the results of a test,
1027 it is recommended that the test report includes the following information:
1029 - Hardware details including:
1032 - Processor details.
1033 - Memory information (see below)
1034 - Number of enabled cores.
1035 - Number of cores used for the test.
1036 - Number of physical NICs, as well as their details (manufacturer,
1037 versions, type and the PCI slot they are plugged into).
1038 - NIC interrupt configuration.
1039 - BIOS version, release date and any configurations that were
1042 - Software details including:
1044 - OS version (for host and VNF)
1045 - Kernel version (for host and VNF)
1046 - GRUB boot parameters (for host and VNF).
1047 - Hypervisor details (Type and version).
1048 - Selected vSwitch, version number or commit id used.
1049 - vSwitch launch command line if it has been parameterised.
1050 - Memory allocation to the vSwitch – which NUMA node it is using,
1051 and how many memory channels.
1052 - Where the vswitch is built from source: compiler details including
1053 versions and the flags that were used to compile the vSwitch.
1054 - DPDK or any other SW dependency version number or commit id used.
1055 - Memory allocation to a VM - if it's from Hugpages/elsewhere.
1056 - VM storage type: snapshot/independent persistent/independent
1059 - Number of Virtual NICs (vNICs), versions, type and driver.
1060 - Number of virtual CPUs and their core affinity on the host.
1061 - Number vNIC interrupt configuration.
1062 - Thread affinitization for the applications (including the vSwitch
1063 itself) on the host.
1064 - Details of Resource isolation, such as CPUs designated for
1065 Host/Kernel (isolcpu) and CPUs designated for specific processes
1084 - Traffic Information:
1086 - Traffic type - UDP, TCP, IMIX / Other.
1089 - Deployment Scenario.
1091 **Note**: Tests that require additional parameters to be recorded will
1092 explicitly specify this.
1101 This section will detail the test activities that will be conducted by vsperf
1102 as well as the infrastructure that will be used to complete the tests in OPNFV.
1106 Planned activities and tasks; test progression
1107 =================================================
1108 A key consideration when conducting any sort of benchmark is trying to
1109 ensure the consistency and repeatability of test results between runs.
1110 When benchmarking the performance of a virtual switch there are many
1111 factors that can affect the consistency of results. This section
1112 describes these factors and the measures that can be taken to limit
1113 their effects. In addition, this section will outline some system tests
1114 to validate the platform and the VNF before conducting any vSwitch
1117 **System Isolation:**
1119 When conducting a benchmarking test on any SUT, it is essential to limit
1120 (and if reasonable, eliminate) any noise that may interfere with the
1121 accuracy of the metrics collected by the test. This noise may be
1122 introduced by other hardware or software (OS, other applications), and
1123 can result in significantly varying performance metrics being collected
1124 between consecutive runs of the same test. In the case of characterizing
1125 the performance of a virtual switch, there are a number of configuration
1126 parameters that can help increase the repeatability and stability of
1127 test results, including:
1129 - OS/GRUB configuration:
1131 - maxcpus = n where n >= 0; limits the kernel to using 'n'
1132 processors. Only use exactly what you need.
1133 - isolcpus: Isolate CPUs from the general scheduler. Isolate all
1134 CPUs bar one which will be used by the OS.
1135 - use taskset to affinitize the forwarding application and the VNFs
1136 onto isolated cores. VNFs and the vSwitch should be allocated
1137 their own cores, i.e. must not share the same cores. vCPUs for the
1138 VNF should be affinitized to individual cores also.
1139 - Limit the amount of background applications that are running and
1140 set OS to boot to runlevel 3. Make sure to kill any unnecessary
1141 system processes/daemons.
1142 - Only enable hardware that you need to use for your test – to
1143 ensure there are no other interrupts on the system.
1144 - Configure NIC interrupts to only use the cores that are not
1145 allocated to any other process (VNF/vSwitch).
1147 - NUMA configuration: Any unused sockets in a multi-socket system
1149 - CPU pinning: The vSwitch and the VNF should each be affinitized to
1150 separate logical cores using a combination of maxcpus, isolcpus and
1152 - BIOS configuration: BIOS should be configured for performance where
1153 an explicit option exists, sleep states should be disabled, any
1154 virtualization optimization technologies should be enabled, and
1155 hyperthreading should also be enabled, turbo boost and overclocking
1158 **System Validation:**
1160 System validation is broken down into two sub-categories: Platform
1161 validation and VNF validation. The validation test itself involves
1162 verifying the forwarding capability and stability for the sub-system
1163 under test. The rationale behind system validation is two fold. Firstly
1164 to give a tester confidence in the stability of the platform or VNF that
1165 is being tested; and secondly to provide base performance comparison
1166 points to understand the overhead introduced by the virtual switch.
1168 * Benchmark platform forwarding capability: This is an OPTIONAL test
1169 used to verify the platform and measure the base performance (maximum
1170 forwarding rate in fps and latency) that can be achieved by the
1171 platform without a vSwitch or a VNF. The following diagram outlines
1172 the set-up for benchmarking Platform forwarding capability:
1174 .. code-block:: console
1177 +--------------------------------------------------+ |
1178 | +------------------------------------------+ | |
1180 | | l2fw or DPDK L2FWD app | | Host
1182 | +------------------------------------------+ | |
1184 +---+------------------------------------------+---+ __|
1188 +--------------------------------------------------+
1190 | traffic generator |
1192 +--------------------------------------------------+
1194 * Benchmark VNF forwarding capability: This test is used to verify
1195 the VNF and measure the base performance (maximum forwarding rate in
1196 fps and latency) that can be achieved by the VNF without a vSwitch.
1197 The performance metrics collected by this test will serve as a key
1198 comparison point for NIC passthrough technologies and vSwitches. VNF
1199 in this context refers to the hypervisor and the VM. The following
1200 diagram outlines the set-up for benchmarking VNF forwarding
1203 .. code-block:: console
1206 +--------------------------------------------------+ |
1207 | +------------------------------------------+ | |
1211 | +------------------------------------------+ | |
1212 | | Passthrough/SR-IOV | | Host
1213 | +------------------------------------------+ | |
1215 +---+------------------------------------------+---+ __|
1219 +--------------------------------------------------+
1221 | traffic generator |
1223 +--------------------------------------------------+
1226 **Methodology to benchmark Platform/VNF forwarding capability**
1229 The recommended methodology for the platform/VNF validation and
1230 benchmark is: - Run `RFC2889 <https://www.rfc-editor.org/rfc/rfc2289.txt>`__
1231 Maximum Forwarding Rate test, this test will produce maximum
1232 forwarding rate and latency results that will serve as the
1233 expected values. These expected values can be used in
1234 subsequent steps or compared with in subsequent validation tests. -
1235 Transmit bidirectional traffic at line rate/max forwarding rate
1236 (whichever is higher) for at least 72 hours, measure throughput (fps)
1237 and latency. - Note: Traffic should be bidirectional. - Establish a
1238 baseline forwarding rate for what the platform can achieve. - Additional
1239 validation: After the test has completed for 72 hours run bidirectional
1240 traffic at the maximum forwarding rate once more to see if the system is
1241 still functional and measure throughput (fps) and latency. Compare the
1242 measure the new obtained values with the expected values.
1244 **NOTE 1**: How the Platform is configured for its forwarding capability
1245 test (BIOS settings, GRUB configuration, runlevel...) is how the
1246 platform should be configured for every test after this
1248 **NOTE 2**: How the VNF is configured for its forwarding capability test
1249 (# of vCPUs, vNICs, Memory, affinitization…) is how it should be
1250 configured for every test that uses a VNF after this.
1252 **Methodology to benchmark the VNF to vSwitch to VNF deployment scenario**
1254 vsperf has identified the following concerns when benchmarking the VNF to
1255 vSwitch to VNF deployment scenario:
1257 * The accuracy of the timing synchronization between VNFs/VMs.
1258 * The clock accuracy of a VNF/VM if they were to be used as traffic generators.
1259 * VNF traffic generator/receiver may be using resources of the system under
1260 test, causing at least three forms of workload to increase as the traffic
1261 load increases (generation, switching, receiving).
1263 The recommendation from vsperf is that tests for this sceanario must
1264 include an external HW traffic generator to act as the tester/traffic transmitter
1265 and receiver. The perscribed methodology to benchmark this deployment scanrio with
1266 an external tester involves the following three steps:
1268 #. Determine the forwarding capability and latency through the virtual interface
1269 connected to the VNF/VM.
1271 .. Figure:: vm2vm_virtual_interface_benchmark.png
1273 Virtual interfaces performance benchmark
1275 #. Determine the forwarding capability and latency through the VNF/hypervisor.
1277 .. Figure:: vm2vm_hypervisor_benchmark.png
1279 Hypervisor performance benchmark
1281 #. Determine the forwarding capability and latency for the VNF to vSwitch to VNF
1282 taking the information from the previous two steps into account.
1284 .. Figure:: vm2vm_benchmark.png
1286 VNF to vSwitch to VNF performance benchmark
1288 vsperf also identified an alternative configuration for the final step:
1290 .. Figure:: vm2vm_alternative_benchmark.png
1292 VNF to vSwitch to VNF alternative performance benchmark
1296 Environment/infrastructure
1297 ============================
1298 Intel is providing a hosted test-bed with nine bare-metal environments
1299 allocated to different OPNFV projects. Currently a number of servers in
1300 `Intel POD 3 <https://wiki.opnfv.org/display/pharos/Intel+Pod3>`__ are
1301 allocated to vsperf:
1303 * pod3-wcp-node3 and pod3-wcp-node4 which are used for CI jobs.
1304 * pod3-node6 which is used as a vsperf sandbox environment.
1308 vsperf CI jobs are broken down into:
1312 * Runs everyday takes about 10 hours to complete.
1313 * TESTCASES_DAILY='phy2phy_tput back2back phy2phy_tput_mod_vlan
1314 phy2phy_scalability pvp_tput pvp_back2back pvvp_tput pvvp_back2back'.
1315 * TESTPARAM_DAILY='--test-params TRAFFICGEN_PKT_SIZES=(64,128,512,1024,1518)'.
1319 * Runs whenever patches are merged to master.
1320 * Runs a basic Sanity test.
1324 * Runs every time a patch is pushed to gerrit.
1325 * Builds documentation.
1329 There are 2 scripts that are part of VSPERFs CI:
1331 * build-vsperf.sh: Lives in the VSPERF repository in the ci/ directory and is
1332 used to run vsperf with the appropriate cli parameters.
1333 * vswitchperf.yml: YAML description of our jenkins job. lives in the RELENG
1336 More info on vsperf CI can be found here:
1337 https://wiki.opnfv.org/display/vsperf/VSPERF+CI
1341 Responsibilities and authority
1342 ===============================
1343 The group responsible for managing, designing, preparing and executing the
1344 tests listed in the LTD are the vsperf committers and contributors. The vsperf
1345 committers and contributors should work with the relavent OPNFV projects to
1346 ensure that the infrastructure is in place for testing vswitches, and that the
1347 results are published to common end point (a results database).