62b03e53f21279e38e3b0985ec87a38bcdcda191
[yardstick.git] / docs / testing / user / userguide / 12-nsb-overview.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, 2016-2017 Intel Corporation.
5
6 .. Convention for heading levels in Yardstick documentation:
7
8    =======  Heading 0 (reserved for the title in a document)
9    -------  Heading 1
10    ^^^^^^^  Heading 2
11    +++++++  Heading 3
12    '''''''  Heading 4
13
14    Avoid deeper levels because they do not render well.
15
16 ===================================
17 Network Services Benchmarking (NSB)
18 ===================================
19
20 .. _Yardstick: https://wiki.opnfv.org/display/yardstick
21 .. _`ETSI GS NFV-TST001`: http://www.etsi.org/deliver/etsi_gs/NFV-TST/001_099/001/01.01.01_60/gs_nfv-tst001v010101p.pdf
22
23 Abstract
24 --------
25
26 This chapter provides an overview of the NSB, a contribution to OPNFV
27 Yardstick_ from Intel.
28
29 Overview
30 --------
31
32 The goal of NSB is to Extend Yardstick to perform real world VNFs and NFVi
33 Characterization and benchmarking with repeatable and deterministic methods.
34
35 The Network Service Benchmarking (NSB) extends the yardstick framework to do
36 VNF characterization and benchmarking in three different execution
37 environments - bare metal i.e. native Linux environment, standalone virtual
38 environment and managed virtualized environment (e.g. Open stack etc.).
39 It also brings in the capability to interact with external traffic generators
40 both hardware & software based for triggering and validating the traffic
41 according to user defined profiles.
42
43 NSB extension includes:
44
45 * Generic data models of Network Services, based on ETSI spec
46   `ETSI GS NFV-TST 001`_
47 * Standalone :term:`context` for VNF testing like SRIOV, OVS, OVS-DPDK, etc
48 * Generic VNF configuration models and metrics implemented with Python
49   classes
50 * Traffic generator features and traffic profiles
51
52     * L1-L3 stateless traffic profiles
53     * L4-L7 state-full traffic profiles
54     * Tunneling protocol/network overlay support
55
56 * Test case samples
57
58     * Ping
59     * Trex
60     * vPE, vCGNAT, vFirewall etc - ipv4 throughput, latency etc
61
62 * Traffic generators i.e. Trex, ab/nginx, ixia, iperf, etc
63 * KPIs for a given use case:
64
65     * System agent support for collecting NFVi KPI. This includes:
66
67         * CPU statistic
68         * Memory BW
69         * OVS-DPDK Stats
70
71     * Network KPIs e.g. inpackets, outpackets, thoughput, latency
72     * VNF KPIs e.g. packet_in, packet_drop, packet_fwd
73
74 Architecture
75 ------------
76
77 The Network Service (NS) defines a set of Virtual Network Functions (VNF)
78 connected together using NFV infrastructure.
79
80 The Yardstick NSB extension can support multiple VNFs created by different
81 vendors including traffic generators. Every VNF being tested has its
82 own data model. The Network service defines a VNF modelling on base of
83 performed network functionality. The part of the data model is a set of the
84 configuration parameters, number of connection points used and flavor including
85 core and memory amount.
86
87 ETSI defines a Network Service as a set of configurable VNFs working in some
88 NFV Infrastructure connecting each other using Virtual Links available through
89 Connection Points. The ETSI MANO specification defines a set of management
90 entities called Network Service Descriptors (NSD) and VNF Descriptors (VNFD)
91 that define real Network Service. The picture below makes an example how the
92 real Network Operator use-case can map into ETSI Network service definition.
93
94 Network Service framework performs the necessary test steps. It may involve:
95
96 * Interacting with traffic generator and providing the inputs on traffic
97   type / packet structure to generate the required traffic as per the
98   test case. Traffic profiles will be used for this.
99 * Executing the commands required for the test procedure and analyses the
100   command output for confirming whether the command got executed correctly
101   or not e.g. as per the test case, run the traffic for the given
102   time period and wait for the necessary time delay.
103 * Verify the test result.
104 * Validate the traffic flow from SUT.
105 * Fetch the data from SUT and verify the value as per the test case.
106 * Upload the logs from SUT onto the Test Harness server
107 * Retrieve the KPI's provided by particular VNF
108
109 Components of Network Service
110 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111
112 * *Models for Network Service benchmarking*: The Network Service benchmarking
113   requires the proper modelling approach. The NSB provides models using Python
114   files and defining of NSDs and VNFDs.
115
116 The benchmark control application being a part of OPNFV yardstick can call
117 that python models to instantiate and configure the VNFs. Depending on
118 infrastructure type (bare-metal or fully virtualized) that calls could be
119 made directly or using MANO system.
120
121 * *Traffic generators in NSB*: Any benchmark application requires a set of
122   traffic generator and traffic profiles defining the method in which traffic
123   is generated.
124
125 The Network Service benchmarking model extends the Network Service
126 definition with a set of Traffic Generators (TG) that are treated
127 same way as other VNFs being a part of benchmarked network service.
128 Same as other VNFs the traffic generator are instantiated and terminated.
129
130 Every traffic generator has own configuration defined as a traffic profile
131 and a set of KPIs supported. The python models for TG is extended by
132 specific calls to listen and generate traffic.
133
134 * *The stateless TREX traffic generator*: The main traffic generator used as
135   Network Service stimulus is open source TREX tool.
136
137 The TREX tool can generate any kind of stateless traffic.
138
139 .. code-block:: console
140
141         +--------+      +-------+      +--------+
142         |        |      |       |      |        |
143         |  Trex  | ---> |  VNF  | ---> |  Trex  |
144         |        |      |       |      |        |
145         +--------+      +-------+      +--------+
146
147 Supported testcases scenarios:
148
149 * Correlated UDP traffic using TREX traffic generator and replay VNF.
150
151     * using different IMIX configuration like pure voice, pure video traffic etc
152     * using different number IP flows e.g. 1, 1K, 16K, 64K, 256K, 1M flows
153     * Using different number of rules configured e.g. 1, 1K, 10K rules
154
155 For UDP correlated traffic following Key Performance Indicators are collected
156 for every combination of test case parameters:
157
158 * RFC2544 throughput for various loss rate defined (1% is a default)
159
160 Graphical Overview
161 ------------------
162
163 NSB Testing with Yardstick framework facilitate performance testing of various
164 VNFs provided.
165
166 .. code-block:: console
167
168   +-----------+
169   |           |                                             +-------------+
170   |   vPE     |                                          -->| TGen Port 0 |
171   | TestCase  |                                          |  +-------------+
172   |           |                                          |
173   +-----------+     +---------------+      +-------+     |
174                     |               | ---> |  VNF  | <--->
175   +-----------+     |   Yardstick   |      +-------+     |
176   | Test Case | --> |  NSB Testing  |                    |
177   +-----------+     |               |                    |
178         |           |               |                    |
179         |           +---------------+                    |
180   +-----------+                                          |  +-------------+
181   |   Traffic |                                          -->| TGen Port 1 |
182   |  patterns |                                             +-------------+
183   +-----------+
184
185               Figure 1: Network Service - 2 server configuration
186
187 VNFs supported for chracterization
188 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
189
190 1. CGNAPT - Carrier Grade Network Address and port Translation
191 2. vFW - Virtual Firewall
192 3. vACL - Access Control List
193 4. Prox - Packet pROcessing eXecution engine:
194      * VNF can act as Drop, Basic Forwarding (no touch),
195        L2 Forwarding (change MAC), GRE encap/decap, Load balance based on
196        packet fields, Symmetric load balancing
197      * QinQ encap/decap IPv4/IPv6, ARP, QoS, Routing, Unmpls, Policing, ACL
198 5. UDP_Replay