Yardstick Preliminary Documentation
[yardstick.git] / docs / testing / user / userguide / 07-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 viz., 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     • Generic data models of Network Services, based on ETSI specs
34     • New Standalone context for VNF testing like SRIOV, OVS, OVS-DPDK etc
35     • Generic VNF configuration models and metrics implemented with Python
36       classes
37     • Traffic generator features and traffic profiles
38         • L1-L3 state-less traffic profiles
39         • L4-L7 state-full  traffic  profiles
40         • Tunneling protocol / network overlay support
41     • Test case samples
42         • Ping
43         • Trex
44         • vPE,vCGNAT, vFirewall etc - ipv4 throughput, latency etc
45     • Traffic generators like Trex, ab/nginx, ixia, iperf etc
46     • KPIs for a given use case:
47         • System agent support for collecting NFvi KPI. This includes:
48             o CPU statistic
49             o Memory BW
50             o OVS-DPDK Stats
51         • Network KPIs – eg, inpackets, outpackets, thoughput, latency etc
52         • VNF KPIs – packet_in, packet_drop, packet_fwd etc
53
54 Architecture
55 ============
56 The Network Service (NS) defines a set of Virtual Network Functions (VNF)
57 connected together using NFV infrastructure.
58
59 The Yardstick NSB extension can support multiple VNFs created by different
60 vendors including traffic generators. Every VNF being tested has its
61 own data model. The Network service defines a VNF modelling on base of performed
62 network functionality. The part of the data model is a set of the configuration
63 parameters, number of connection points used and flavor including core and
64 memory amount.
65
66 The ETSI defines a Network Service as a set of configurable VNFs working in
67 some NFV Infrastructure connecting each other using Virtual Links available
68 through Connection Points. The ETSI MANO specification defines a set of
69 management entities called Network Service Descriptors (NSD) and
70 VNF Descriptors (VNFD) that define real Network Service. The picture below
71 makes an example how the real Network Operator use-case can map into ETSI
72 Network service definition
73
74 Network Service framework performs the necessary test steps. It may involve
75     o Interacting with traffic generator and providing the inputs on traffic
76       type / packet structure to generate the required traffic as per the
77       test case. Traffic profiles will be used for this.
78     o Executing the commands required for the test procedure and analyses the
79       command output for confirming whether the command got executed correctly
80       or not. E.g. As per the test case, run the traffic for the given
81       time period / wait for the necessary time delay
82     o Verify the test result.
83     o Validate the traffic flow from SUT
84     o Fetch the table / data from SUT and verify the value as per the test case
85     o Upload the logs from SUT onto the Test Harness server
86     o Read the KPI’s provided by particular VNF
87
88 Components of Network Service
89 ------------------------------
90
91 * *Models for Network Service benchmarking*: The Network Service benchmarking
92   requires the proper modelling approach. The NSB provides models using Python
93   files and defining of NSDs and VNFDs.
94
95 The benchmark control application being a part of OPNFV yardstick can call
96 that python models to instantiate and configure the VNFs. Depending on
97 infrastructure type (bare-metal or fully virtualized) that calls could be
98 made directly or using MANO system.
99
100 * *Traffic generators in NSB*: Any benchmark application requires a set of
101   traffic generator and traffic profiles defining the method in which traffic
102   is generated.
103
104 The Network Service benchmarking model extends the Network Service
105 definition with a set of Traffic Generators (TG) that are treated
106 same way as other VNFs being a part of benchmarked network service.
107 Same as other VNFs the traffic generator are instantiated and terminated.
108
109 Every traffic generator has own configuration defined as a traffic profile and
110 a set of KPIs supported. The python models for TG is extended by specific calls
111 to listen and generate traffic.
112
113 * *The stateless TREX traffic generator*: The main traffic generator used as
114   Network Service stimulus is open source TREX tool.
115
116 The TREX tool can generate any kind of stateless traffic.
117
118 .. code-block:: console
119
120         +--------+      +-------+      +--------+
121         |        |      |       |      |        |
122         |  Trex  | ---> |  VNF  | ---> |  Trex  |
123         |        |      |       |      |        |
124         +--------+      +-------+      +--------+
125
126 Supported testcases scenarios:
127 • Correlated UDP traffic using TREX traffic generator and replay VNF.
128     o using different IMIX configuration like pure voice, pure video traffic etc
129     o using different number IP flows like 1 flow, 1K, 16K, 64K, 256K, 1M flows
130     o Using different number of rules configured like 1 rule, 1K, 10K rules
131
132 For UDP correlated traffic following Key Performance Indicators are collected
133 for every combination of test case parameters:
134         • RFC2544 throughput for various loss rate defined (1% is a default)
135
136 Graphical Overview
137 ==================
138
139 NSB Testing with yardstick framework  facilitate performance testing of various
140 VNFs provided.
141
142 .. code-block:: console
143   +-----------+
144   |           |                                                     +-----------+
145   |   vPE     |                                                   ->|TGen Port 0|
146   | TestCase  |                                                   | +-----------+
147   |           |                                                   |
148   +-----------+     +------------------+            +-------+     |
149                     |                  | -- API --> |  VNF  | <--->
150   +-----------+     |     Yardstick    |            +-------+     |
151   | Test Case | --> |    NSB Testing   |                          |
152   +-----------+     |                  |                          |
153         |           |                  |                          |
154         |           +------------------+                          |
155   +-----------+                                                   | +-----------+
156   |   Traffic |                                                   ->|TGen Port 1|
157   |  patterns |                                                     +-----------+
158   +-----------+
159               Figure 1: Network Service - 2 server configuration
160
161
162 Install
163 =======
164
165 run the nsb_install.sh with root privileges
166
167 Run
168 ===
169
170 source ~/.bash_profile
171 cd <yardstick_repo>/yardstick/cmd
172 sudo -E ./NSBperf.py --vnf vpe --test tc_baremetal_rfc2544_ipv4_1flow_64B.yaml
173
174 Development Environment
175 =======================
176
177 Ubuntu 14.04, Ubuntu 16.04