1 Performance Trending Methodology
2 ================================
4 .. _trending_methodology:
6 Continuous Trending and Analysis
7 --------------------------------
9 This document describes a high-level design of a system for continuous
10 performance measuring, trending and change detection for FD.io VPP SW
11 data plane. It builds upon the existing FD.io CSIT framework with
12 extensions to its throughput testing methodology, CSIT data analytics
13 engine (PAL – Presentation-and-Analytics-Layer) and associated Jenkins
16 Proposed design replaces existing CSIT performance trending jobs and
17 tests with new Performance Trending (PT) CSIT module and separate
18 Performance Analysis (PA) module ingesting results from PT and
19 analysing, detecting and reporting any performance anomalies using
20 historical trending data and statistical metrics. PA does also produce
21 trending dashboard and graphs with summary and drill-down views across
22 all specified tests that can be reviewed and inspected regularly by
23 FD.io developers and users community.
25 Performance Trending Tests
26 --------------------------
28 Performance trending is currently relying on the Maximum Receive Rate
29 (MRR) tests. MRR tests measure the packet forwarding rate under the
30 maximum load offered by traffic generator over a set trial duration,
31 regardless of packet loss. Maximum load for specified Ethernet frame
32 size is set to the bi-directional link rate.
34 Current parameters for performance trending MRR tests:
36 - Ethernet frame sizes: 64B (78B for IPv6 tests) for all tests, IMIX for
37 selected tests (vhost, memif); all quoted sizes include frame CRC, but
38 exclude per frame transmission overhead of 20B (preamble, inter frame
41 - Maximum load offered: 10GE and 40GE link (sub-)rates depending on NIC
42 tested, with the actual packet rate depending on frame size,
43 transmission overhead and traffic generator NIC forwarding capacity.
45 - For 10GE NICs the maximum packet rate load is 2* 14.88 Mpps for 64B,
46 a 10GE bi-directional link rate.
47 - For 40GE NICs the maximum packet rate load is 2* 18.75 Mpps for 64B,
48 a 40GE bi-directional link sub-rate limited by TG 40GE NIC used,
51 - Trial duration: 10sec.
52 - Execution frequency: twice a day, every 12 hrs (02:00, 14:00 UTC).
54 In the future if tested VPP configuration can handle the packet rate
55 higher than bi-directional 10GE link rate, e.g. all IMIX tests and
56 64B/78B multi-core tests, a higher maximum load will be offered
59 Performance Trend Analysis
60 --------------------------
62 All measured performance trend data is treated as time-series data that
63 can be modelled using normal distribution. After trimming the outliers,
64 the median and deviations from median are used for detecting performance
65 change anomalies following the three-sigma rule of thumb (a.k.a.
71 Following statistical metrics are proposed as performance trend
72 indicators over the rolling window of last <N> sets of historical
75 - Q1, Q2, Q3 : Quartiles, three points dividing a ranked data set
76 of <N> values into four equal parts, Q2 is the median of the data.
77 - IQR = Q3 - Q1 : Inter Quartile Range, measure of variability, used
78 here to calculate and eliminate outliers.
79 - Outliers : extreme values that are at least (1.5 * IQR) below Q1.
81 - Note: extreme values that are at least (1.5 * IQR) above Q3 are not
82 considered outliers, and are likely to be classified as
85 - TMA : Trimmed Moving Average, average across the data set of <N>
86 values without the outliers. Used here to calculate TMSD.
87 - TMSD : Trimmed Moving Standard Deviation, standard deviation over the
88 data set of <N> values without the outliers,
89 requires calculating TMA. Used for anomaly detection.
90 - TMM : Trimmed Moving Median, median across the data set of <N> values
91 excluding the outliers. Used as a trending value and as a reference
92 for anomaly detection.
97 Outlier evaluation of test result of value <X> follows the definition
98 from previous section:
100 Outlier Evaluation Formula Evaluation Result
101 ====================================================
102 X < (Q1 - 1.5 * IQR) Outlier
103 X >= (Q1 - 1.5 * IQR) Valid (For Trending)
108 To verify compliance of test result of valid value <X> against defined
109 trend metrics and detect anomalies, three simple evaluation formulas are
112 Anomaly Compliance Evaluation
113 Evaluation Formula Confidence Level Result
114 =============================================================================
115 (TMM - 3 * TMSD) <= X <= (TMM + 3 * TMSD) 99.73% Normal
116 X < (TMM - 3 * TMSD) Anomaly Regression
117 X > (TMM + 3 * TMSD) Anomaly Progression
119 TMM is used for the central trend reference point instead of TMA as it
120 is more robust to anomalies.
125 Trend compliance metrics are targeted to provide an indication of trend
126 changes over a short-term (i.e. weekly) and a long-term (i.e.
127 quarterly), comparing the last trend value, TMM[last], to one from week
128 ago, TMM[last - 1week] and to the maximum of trend values over last
129 quarter except last week, max(TMM[(last - 3mths)..(last - 1week)]),
130 respectively. This results in following trend compliance calculations:
133 Compliance Metric Change Formula V(alue) R(eference)
134 =============================================================================================
135 Short-Term Change ((V - R) / R) TMM[last] TMM[last - 1week]
136 Long-Term Change ((V - R) / R) TMM[last] max(TMM[(last - 3mths)..(last - 1week)])
138 Performance Trend Presentation
139 ------------------------------
141 Performance Dashboard
142 `````````````````````
144 Dashboard tables list a summary of per test-case VPP MRR performance
145 trend and trend compliance metrics and detected number of anomalies.
147 Separate tables are generated for tested VPP worker-thread-core
148 combinations (1t1c, 2t2c, 4t4c). Test case names are linked to
149 respective trending graphs for ease of navigation thru the test data.
154 Trendline graphs show per test case measured MRR throughput values with
155 associated trendlines. The graphs are constructed as follows:
157 - X-axis represents performance trend job build Id (csit-vpp-perf-mrr-
159 - Y-axis represents MRR throughput in Mpps.
160 - Markers to indicate anomaly classification:
162 - Outlier - gray circle around MRR value point.
163 - Regression - red circle.
164 - Progression - green circle.
166 In addition the graphs show dynamic labels while hovering over graph
167 data points, representing (trend job build Id, MRR value) and the actual
168 vpp build number (b<XXX>) tested.
171 Jenkins Jobs Description
172 ------------------------
174 Performance Trending (PT)
175 `````````````````````````
177 CSIT PT runs regular performance test jobs measuring and collecting MRR
178 data per test case. PT is designed as follows:
182 #. Periodic e.g. daily.
183 #. On-demand gerrit triggered.
185 #. Measurements and data calculations per test case:
187 #. MRR Max Received Rate
189 #. Measured: Unlimited tolerance of packet loss.
190 #. Send packets at link rate, count total received packets, divide
191 by test trial period.
193 #. Archive MRR per test case.
194 #. Archive all counters collected at MRR.
196 Performance Analysis (PA)
197 `````````````````````````
199 CSIT PA runs performance analysis including trendline calculation, trend
200 compliance and anomaly detection using specified trend analysis metrics
201 over the rolling window of last <N> sets of historical measurement data.
202 PA is defined as follows:
206 #. By PT job at its completion.
207 #. On-demand gerrit triggered.
209 #. Download and parse archived historical data and the new data:
211 #. Download RF output.xml files from latest PT job and compressed
214 #. Parse out the data filtering test cases listed in PA specification
215 (part of CSIT PAL specification file).
217 #. Evalute new data from latest PT job against the rolling window of
218 <N> sets of historical data for trendline calculation, anomaly
219 detection and short-term trend compliance. And against long-term
220 trendline metrics for long-term trend compliance.
222 #. Calculate trend metrics for the rolling window of <N> sets of
225 #. Calculate quartiles Q1, Q2, Q3.
226 #. Trim outliers using IQR.
227 #. Calculate TMA and TMSD.
228 #. Calculate normal trending range per test case based on TMM and
231 #. Evaluate new test data against trend metrics:
233 #. If within the range of (TMA +/- 3*TMSD) => Result = Pass,
234 Reason = Normal. (to be updated base on final Jenkins code)
235 #. If below the range => Result = Fail, Reason = Regression.
236 #. If above the range => Result = Pass, Reason = Progression.
238 #. Generate and publish results
240 #. Relay evaluation result to job result. (to be updated base on final
242 #. Generate a new set of trend summary dashboard and graphs.
243 #. Publish trend dashboard and graphs in html format on https://docs.fd.io/.