feat(docs): Add Methodology
[csit.git] / docs / content / methodology / telemetry.md
1 ---
2 bookToc: false
3 title: "Telemetry"
4 weight: 20
5 ---
6
7 # Telemetry
8
9 OpenMetrics specifies the de-facto standard for transmitting cloud-native
10 metrics at scale, with support for both text representation and Protocol
11 Buffers.
12
13 ## RFC
14
15 - RFC2119
16 - RFC5234
17 - RFC8174
18 - draft-richih-opsawg-openmetrics-00
19
20 ## Reference
21
22 [OpenMetrics](https://github.com/OpenObservability/OpenMetrics/blob/master/specification/OpenMetrics.md)
23
24 ## Metric Types
25
26 - Gauge
27 - Counter
28 - StateSet
29 - Info
30 - Histogram
31 - GaugeHistogram
32 - Summary
33 - Unknown
34
35 Telemetry module in CSIT currently support only Gauge, Counter and Info.
36
37 ## Anatomy of CSIT telemetry implementation
38
39 Existing implementation consists of several measurment building blocks:
40 the main measuring block running search algorithms (MLR, PLR, SOAK, MRR, ...),
41 the latency measuring block and the several telemetry blocks with or without
42 traffic running on a background.
43
44 The main measuring block must not be interrupted by any read operation that can
45 impact data plane traffic processing during throughput search algorithm. Thus
46 operational reads are done before (pre-stat) and after (post-stat) that block.
47
48 Some operational reads must be done while traffic is running and usually
49 consists of two reads (pre-run-stat, post-run-stat) with defined delay between
50 them.
51
52 ## MRR measurement
53
54   traffic_start(r=mrr)               traffic_stop       |<     measure     >|
55     |                                  |                |      (r=mrr)      |
56     |   pre_run_stat   post_run_stat   |    pre_stat    |                   |  post_stat
57     |        |               |         |       |        |                   |      |
58   --o--------o---------------o---------o-------o--------+-------------------+------o------------>
59                                                                                               t
60
61   Legend:
62     - pre_run_stat
63       - vpp-clear-runtime
64     - post_run_stat
65       - vpp-show-runtime
66       - bash-perf-stat            // if extended_debug == True
67     - pre_stat
68       - vpp-clear-stats
69       - vpp-enable-packettrace    // if extended_debug == True
70       - vpp-enable-elog
71     - post_stat
72       - vpp-show-stats
73       - vpp-show-packettrace      // if extended_debug == True
74       - vpp-show-elog
75
76
77     |<                                measure                                 >|
78     |                                 (r=mrr)                                  |
79     |                                                                          |
80     |<    traffic_trial0    >|<    traffic_trial1    >|<    traffic_trialN    >|
81     |    (i=0,t=duration)    |    (i=1,t=duration)    |    (i=N,t=duration)    |
82     |                        |                        |                        |
83   --o------------------------o------------------------o------------------------o--->
84                                                                                  t
85
86
87 ## MLR measurement
88
89     |<     measure     >|   traffic_start(r=pdr)               traffic_stop   traffic_start(r=ndr)               traffic_stop  |< [    latency    ] >|
90     |      (r=mlr)      |    |                                  |              |                                  |            |     .9/.5/.1/.0     |
91     |                   |    |   pre_run_stat   post_run_stat   |              |   pre_run_stat   post_run_stat   |            |                     |
92     |                   |    |        |               |         |              |        |               |         |            |                     |
93   --+-------------------+----o--------o---------------o---------o--------------o--------o---------------o---------o------------[---------------------]--->
94                                                                                                                                                        t
95
96   Legend:
97     - pre_run_stat
98       - vpp-clear-runtime
99     - post_run_stat
100       - vpp-show-runtime
101       - bash-perf-stat          // if extended_debug == True
102     - pre_stat
103       - vpp-clear-stats
104       - vpp-enable-packettrace  // if extended_debug == True
105       - vpp-enable-elog
106     - post_stat
107       - vpp-show-stats
108       - vpp-show-packettrace    // if extended_debug == True
109       - vpp-show-elog
110
111
112 ## MRR measurement
113
114     traffic_start(r=mrr)               traffic_stop                 |<     measure     >|
115       |                                  |                          |      (r=mrr)      |
116       |   |<      stat_runtime      >|   |          stat_pre_trial  |                   |  stat_post_trial
117       |   |                          |   |             |            |                   |     |
118   ----o---+--------------------------+---o-------------o------------+-------------------+-----o------------->
119                                                                                                           t
120
121   Legend:
122     - stat_runtime
123       - vpp-runtime
124     - stat_pre_trial
125       - vpp-clear-stats
126       - vpp-enable-packettrace  // if extended_debug == True
127     - stat_post_trial
128       - vpp-show-stats
129       - vpp-show-packettrace    // if extended_debug == True
130
131
132     |<                                measure                                 >|
133     |                                 (r=mrr)                                  |
134     |                                                                          |
135     |<    traffic_trial0    >|<    traffic_trial1    >|<    traffic_trialN    >|
136     |    (i=0,t=duration)    |    (i=1,t=duration)    |    (i=N,t=duration)    |
137     |                        |                        |                        |
138   --o------------------------o------------------------o------------------------o--->
139                                                                                  t
140
141
142     |<                              stat_runtime                              >|
143     |                                                                          |
144     |<       program0       >|<       program1       >|<       programN       >|
145     |       (@=params)       |       (@=params)       |       (@=params)       |
146     |                        |                        |                        |
147   --o------------------------o------------------------o------------------------o--->
148                                                                                  t
149
150
151 ## MLR measurement
152
153     |<     measure     >|   traffic_start(r=pdr)               traffic_stop   traffic_start(r=ndr)               traffic_stop  |< [    latency    ] >|
154     |      (r=mlr)      |     |                                  |              |                                  |           |     .9/.5/.1/.0     |
155     |                   |     |   |<      stat_runtime      >|   |              |   |<      stat_runtime      >|   |           |                     |
156     |                   |     |   |                          |   |              |   |                          |   |           |                     |
157   --+-------------------+-----o---+--------------------------+---o--------------o---+--------------------------+---o-----------[---------------------]--->
158                                                                                                                                                        t
159
160   Legend:
161     - stat_runtime
162       - vpp-runtime
163     - stat_pre_trial
164       - vpp-clear-stats
165       - vpp-enable-packettrace  // if extended_debug == True
166     - stat_post_trial
167       - vpp-show-stats
168       - vpp-show-packettrace    // if extended_debug == True