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