1 .. _trending_methodology:
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.
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
40 - **Maximum load offered**: 10GE and 40GE link (sub-)rates depending on NIC
41 tested, with the actual packet rate depending on frame size,
42 transmission overhead and traffic generator NIC forwarding capacity.
44 - For 10GE NICs the maximum packet rate load is 2* 14.88 Mpps for 64B,
45 a 10GE bi-directional link rate.
46 - For 40GE NICs the maximum packet rate load is 2* 18.75 Mpps for 64B,
47 a 40GE bi-directional link sub-rate limited by TG 40GE NIC used,
50 - **Trial duration**: 10sec.
51 - **Execution frequency**: twice a day, every 12 hrs (02:00, 14:00 UTC).
53 Note: MRR tests should be reporting bi-directional link rate (or NIC
54 rate, if lower) if tested VPP configuration can handle the packet rate
55 higher than bi-directional link rate, e.g. large packet tests and/or
56 multi-core tests. In other words MRR = min(VPP rate, bi-dir link rate,
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 used as performance trend indicators
72 over the rolling window of last <N> sets of historical measurement data:
74 - **Q1**, **Q2**, **Q3** : **Quartiles**, three points dividing a ranked
75 data set of <N> values into four equal parts, Q2 is the median of the
77 - **IQR** = Q3 - Q1 : **Inter Quartile Range**, measure of variability,
78 used 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
86 <N> values without the outliers. Used here to calculate TMSD.
87 - **TMSD** : **Trimmed Moving Standard Deviation**, standard deviation
88 over the data set of <N> values without the outliers, requires
89 calculating TMA. Used for anomaly detection.
90 - **TMM** : **Trimmed Moving Median**, median across the data set of <N>
91 values excluding the outliers. Used as a trending value and as a
92 reference for anomaly detection.
97 Outlier evaluation of test result of value *X* follows the definition
98 from previous section:
100 +----------------------------+----------------------+
101 | Outlier Evaluation Formula | Evaluation Result |
102 +============================+======================+
103 | X < (Q1 - 1.5 * IQR) | Outlier |
104 +----------------------------+----------------------+
105 | X >= (Q1 - 1.5 * IQR) | Valid (For Trending) |
106 +----------------------------+----------------------+
111 To verify compliance of test result of valid value <X> against defined
112 trend metrics and detect anomalies, three simple evaluation formulas are
115 +-------------------------------------------+-----------------------------+-------------------+
116 | Anomaly Evaluation Formula | Compliance Confidence Level | Evaluation Result |
117 +===========================================+=============================+===================+
118 | (TMM - 3 * TMSD) <= X <= (TMM + 3 * TMSD) | 99.73% | Normal |
119 +-------------------------------------------+-----------------------------+-------------------+
120 | X < (TMM - 3 * TMSD) | Anomaly | Regression |
121 +-------------------------------------------+-----------------------------+-------------------+
122 | X > (TMM + 3 * TMSD) | Anomaly | Progression |
123 +-------------------------------------------+-----------------------------+-------------------+
125 TMM is used for the central trend reference point instead of TMA as it
126 is more robust to anomalies.
131 Trend compliance metrics are targeted to provide an indication of trend
132 changes over a short-term (i.e. weekly) and a long-term (i.e.
133 quarterly), comparing the last trend value, TMM[last], to one from week
134 ago, TMM[last - 1week] and to the maximum of trend values over last
135 quarter except last week, max(TMM[(last - 3mths)..(last - 1week)]),
136 respectively. This results in following trend compliance calculations:
138 +-------------------------+---------------------------------+-----------+------------------------------------------+
139 | Trend Compliance Metric | Trend Change Formula | Value | Reference |
140 +=========================+=================================+===========+==========================================+
141 | Short-Term Change | (Value - Reference) / Reference | TMM[last] | TMM[last - 1week] |
142 +-------------------------+---------------------------------+-----------+------------------------------------------+
143 | Long-Term Change | (Value - Reference) / Reference | TMM[last] | max(TMM[(last - 3mths)..(last - 1week)]) |
144 +-------------------------+---------------------------------+-----------+------------------------------------------+
149 Performance Dashboard
150 `````````````````````
152 Dashboard tables list a summary of per test-case VPP MRR performance
153 trend and trend compliance metrics and detected number of anomalies.
155 Separate tables are generated for tested VPP worker-thread-core
156 combinations (1t1c, 2t2c, 4t4c). Test case names are linked to
157 respective trending graphs for ease of navigation thru the test data.
162 Trendline graphs show per test case measured MRR throughput values with
163 associated trendlines. The graphs are constructed as follows:
165 - X-axis represents performance trend job build Id (csit-vpp-perf-mrr-
167 - Y-axis represents MRR throughput in Mpps.
168 - Markers to indicate anomaly classification:
170 - Outlier - gray circle around MRR value point.
171 - Regression - red circle.
172 - Progression - green circle.
174 In addition the graphs show dynamic labels while hovering over graph
175 data points, representing (trend job build Id, MRR value) and the actual
176 vpp build number (b<XXX>) tested.
182 Performance Trending (PT)
183 `````````````````````````
185 CSIT PT runs regular performance test jobs measuring and collecting MRR
186 data per test case. PT is designed as follows:
190 a) Periodic e.g. daily.
191 b) On-demand gerrit triggered.
193 2. Measurements and data calculations per test case:
195 a) Max Received Rate (MRR) - send packets at link rate over a trial
196 period, count total received packets, divide by trial period.
198 3. Archive MRR per test case.
199 4. Archive all counters collected at MRR.
201 Performance Analysis (PA)
202 `````````````````````````
204 CSIT PA runs performance analysis including trendline calculation, trend
205 compliance and anomaly detection using specified trend analysis metrics
206 over the rolling window of last <N> sets of historical measurement data.
207 PA is defined as follows:
211 a) By PT job at its completion.
212 b) On-demand gerrit triggered.
214 2. Download and parse archived historical data and the new data:
216 a) Download RF output.xml files from latest PT job and compressed
218 b) Parse out the data filtering test cases listed in PA specification
219 (part of CSIT PAL specification file).
220 c) Evalute new data from latest PT job against the rolling window of
221 <N> sets of historical data for trendline calculation, anomaly
222 detection and short-term trend compliance. And against long-term
223 trendline metrics for long-term trend compliance.
225 3. Calculate trend metrics for the rolling window of <N> sets of
228 a) Calculate quartiles Q1, Q2, Q3.
229 b) Trim outliers using IQR.
230 c) Calculate TMA and TMSD.
231 d) Calculate normal trending range per test case based on TMM and
234 4. Evaluate new test data against trend metrics:
236 a) If within the range of (TMA +/- 3*TMSD) => Result = Pass,
237 Reason = Normal. (to be updated base on the final Jenkins code).
238 b) If below the range => Result = Fail, Reason = Regression.
239 c) If above the range => Result = Pass, Reason = Progression.
241 5. Generate and publish results
243 a) Relay evaluation result to job result. (to be updated base on the
245 b) Generate a new set of trend summary dashboard and graphs.
246 c) Publish trend dashboard and graphs in html format on