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