012ea6c3dfb72434af532b7ef9f0157ab5ec13d4
[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 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 * Scenarios that handle NSB test cases execution
69
70     * NSPerf - scenario that handles generic NSB test case execution
71       (setup and init tg/vnf, trigger traffic on tg, collect kpi)
72     * NSPerf-RFC2544 - scenario that allows repeatable triggering of traffic on
73       traffic generators until test case acceptance criteria is met
74       (for example RFC2544 binary search)
75
76 * Test case samples
77
78     * Ping
79     * Trex
80     * vPE, vCGNAT, vFirewall etc - ipv4 throughput, latency etc
81
82 * Traffic generators i.e. Trex, ab/nginx, ixia, iperf, etc
83 * KPIs for a given use case:
84
85     * System agent support for collecting NFVi KPI. This includes:
86
87         * CPU statistic
88         * Memory BW
89         * OVS-DPDK Stats
90
91     * Network KPIs e.g. inpackets, outpackets, thoughput, latency
92     * VNF KPIs e.g. packet_in, packet_drop, packet_fwd
93
94 Architecture
95 ------------
96
97 The Network Service (NS) defines a set of Virtual Network Functions (VNF)
98 connected together using NFV infrastructure.
99
100 The Yardstick NSB extension can support multiple VNFs created by different
101 vendors including traffic generators. Every VNF being tested has its
102 own data model. The Network service defines a VNF modelling on base of
103 performed network functionality. The part of the data model is a set of the
104 configuration parameters, number of connection points used and flavor including
105 core and memory amount.
106
107 ETSI defines a Network Service as a set of configurable VNFs working in some
108 NFV Infrastructure connecting each other using Virtual Links available through
109 Connection Points. The ETSI MANO specification defines a set of management
110 entities called Network Service Descriptors (NSD) and VNF Descriptors (VNFD)
111 that define real Network Service. The picture below makes an example how the
112 real Network Operator use-case can map into ETSI Network service definition.
113
114 Network Service framework performs the necessary test steps. It may involve:
115
116 * Interacting with traffic generator and providing the inputs on traffic
117   type / packet structure to generate the required traffic as per the
118   test case. Traffic profiles will be used for this.
119 * Executing the commands required for the test procedure and analyses the
120   command output for confirming whether the command got executed correctly
121   or not e.g. as per the test case, run the traffic for the given
122   time period and wait for the necessary time delay.
123 * Verify the test result.
124 * Validate the traffic flow from SUT.
125 * Fetch the data from SUT and verify the value as per the test case.
126 * Upload the logs from SUT onto the Test Harness server
127 * Retrieve the KPI's provided by particular VNF
128
129 Components of Network Service
130 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131
132 .. TODO: provide a list of components in this section and describe them in
133    later sub-sections
134
135 .. Components are the methodology, TGs, framework extensions, KPI collection,
136    Testcases, SampleVNFs
137 .. Framework extentions include: VNF models, NSPerf Scenario, contexts
138
139 * *Models for Network Service benchmarking*: The Network Service benchmarking
140   requires the proper modelling approach. The NSB provides models using Python
141   files and defining of NSDs and VNFDs.
142
143 The benchmark control application being a part of OPNFV Yardstick can call
144 that Python models to instantiate and configure the VNFs. Depending on
145 infrastructure type (bare-metal or fully virtualized) that calls could be
146 made directly or using MANO system.
147
148 * *Traffic generators in NSB*: Any benchmark application requires a set of
149   traffic generator and traffic profiles defining the method in which traffic
150   is generated.
151
152 The Network Service benchmarking model extends the Network Service
153 definition with a set of Traffic Generators (TG) that are treated
154 same way as other VNFs being a part of benchmarked network service.
155 Same as other VNFs the traffic generator are instantiated and terminated.
156
157 Every traffic generator has own configuration defined as a traffic profile
158 and a set of KPIs supported. The python models for TG is extended by
159 specific calls to listen and generate traffic.
160
161 * *The stateless TREX traffic generator*: The main traffic generator used as
162   Network Service stimulus is open source TREX tool.
163
164 The TREX tool can generate any kind of stateless traffic.
165
166 .. code-block:: console
167
168         +--------+      +-------+      +--------+
169         |        |      |       |      |        |
170         |  Trex  | ---> |  VNF  | ---> |  Trex  |
171         |        |      |       |      |        |
172         +--------+      +-------+      +--------+
173
174 Supported testcases scenarios:
175
176 * Correlated UDP traffic using TREX traffic generator and replay VNF.
177
178     * using different IMIX configuration like pure voice, pure video traffic etc
179     * using different number IP flows e.g. 1, 1K, 16K, 64K, 256K, 1M flows
180     * Using different number of rules configured e.g. 1, 1K, 10K rules
181
182 For UDP correlated traffic following Key Performance Indicators are collected
183 for every combination of test case parameters:
184
185 * RFC2544 throughput for various loss rate defined (1% is a default)
186
187 KPI Collection
188 ^^^^^^^^^^^^^^
189
190 KPI collection is the process of sampling KPIs at multiple intervals to allow
191 for investigation into anomalies during runtime. Some KPI intervals are
192 adjustable. KPIs are collected from traffic generators and NFVI for the SUT.
193 There is already some reporting in NSB available, but NSB collects all KPIs for
194 analytics to process.
195
196 Below is an example list of basic KPIs:
197 * Throughput
198 * Latency
199 * Packet delay variation
200 * Maximum establishment rate
201 * Maximum tear-down rate
202 * Maximum simultaneous number of sessions
203
204 Of course, there can be many other KPIs that will be relevant for a specific
205 NFVI, but in most cases these KPIs are enough to give you a basic picture of
206 the SUT. NSB also uses :term:`collectd` in order to collect the KPIs. Currently
207 the following collectd plug-ins are enabled for NSB testcases:
208
209 * Libvirt
210 * Interface stats
211 * OvS events
212 * vSwitch stats
213 * Huge Pages
214 * RAM
215 * CPU usage
216 * IntelĀ® PMU
217 * Intel(r) RDT
218
219 Graphical Overview
220 ------------------
221
222 NSB Testing with Yardstick framework facilitate performance testing of various
223 VNFs provided.
224
225 .. code-block:: console
226
227   +-----------+
228   |           |                                             +-------------+
229   |   vPE     |                                          -->| TGen Port 0 |
230   | TestCase  |                                          |  +-------------+
231   |           |                                          |
232   +-----------+     +---------------+      +-------+     |
233                     |               | ---> |  VNF  | <--->
234   +-----------+     |   Yardstick   |      +-------+     |
235   | Test Case | --> |  NSB Testing  |                    |
236   +-----------+     |               |                    |
237         |           |               |                    |
238         |           +---------------+                    |
239   +-----------+                                          |  +-------------+
240   |   Traffic |                                          -->| TGen Port 1 |
241   |  patterns |                                             +-------------+
242   +-----------+
243
244               Figure 1: Network Service - 2 server configuration
245
246 VNFs supported for chracterization
247 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
248
249 1. CGNAPT - Carrier Grade Network Address and port Translation
250 2. vFW - Virtual Firewall
251 3. vACL - Access Control List
252 4. PROX - Packet pROcessing eXecution engine:
253      * VNF can act as Drop, Basic Forwarding (no touch),
254        L2 Forwarding (change MAC), GRE encap/decap, Load balance based on
255        packet fields, Symmetric load balancing
256      * QinQ encap/decap IPv4/IPv6, ARP, QoS, Routing, Unmpls, Policing, ACL
257 5. UDP_Replay