Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement QoS application monitoring #346

Merged
merged 37 commits into from Nov 23, 2021
Merged

Implement QoS application monitoring #346

merged 37 commits into from Nov 23, 2021

Conversation

pudelkoM
Copy link
Member

@pudelkoM pudelkoM commented Oct 5, 2021

Implementation of QoS monitoring as described here.

Steps to try:

  • Start UPF and insert sessions as usual
  • Switch into bessctrl
  • command module qosMeasure read QosMeasureReadArg {'clear': False}
  • docker logs -f bess
  • http://localhost:8080/metrics

Example output:

# HELP upf_session_dropped_packets Shows the number of packets dropped for a given session in UPF
# TYPE upf_session_dropped_packets gauge
upf_session_dropped_packets{fseid="805306368",pdr="1"} 0
upf_session_dropped_packets{fseid="805306368",pdr="3"} 0
# HELP upf_session_jitter_ns Shows the jitter of a session in UPF
# TYPE upf_session_jitter_ns summary
upf_session_jitter_ns{fseid="805306368",pdr="1",quantile="50"} 0
upf_session_jitter_ns{fseid="805306368",pdr="1",quantile="99"} 0
upf_session_jitter_ns{fseid="805306368",pdr="1",quantile="99.9"} 0
upf_session_jitter_ns_sum{fseid="805306368",pdr="1"} 0
upf_session_jitter_ns_count{fseid="805306368",pdr="1"} 216745
upf_session_jitter_ns{fseid="805306368",pdr="3",quantile="50"} 0
upf_session_jitter_ns{fseid="805306368",pdr="3",quantile="99"} 0
upf_session_jitter_ns{fseid="805306368",pdr="3",quantile="99.9"} 0
upf_session_jitter_ns_sum{fseid="805306368",pdr="3"} 0
upf_session_jitter_ns_count{fseid="805306368",pdr="3"} 216742
upf_session_jitter_ns_sum{fseid="805306377",pdr="3"} 0
upf_session_jitter_ns_count{fseid="805306377",pdr="3"} 216743
# HELP upf_session_latency_ns Shows the latency of a session in UPF
# TYPE upf_session_latency_ns summary
upf_session_latency_ns{fseid="805306368",pdr="1",quantile="50"} 16000
upf_session_latency_ns{fseid="805306368",pdr="1",quantile="99"} 17000
upf_session_latency_ns{fseid="805306368",pdr="1",quantile="99.9"} 19000
upf_session_latency_ns_sum{fseid="805306368",pdr="1"} 0
upf_session_latency_ns_count{fseid="805306368",pdr="1"} 216745
upf_session_latency_ns{fseid="805306368",pdr="3",quantile="50"} 15000
upf_session_latency_ns{fseid="805306368",pdr="3",quantile="99"} 16000
upf_session_latency_ns{fseid="805306368",pdr="3",quantile="99.9"} 18000
upf_session_latency_ns_sum{fseid="805306368",pdr="3"} 0
upf_session_latency_ns_count{fseid="805306368",pdr="3"} 216742
# HELP upf_session_tx_bytes Shows the total number of bytes for a given session in UPF
# TYPE upf_session_tx_bytes gauge
upf_session_tx_bytes{fseid="805306368",pdr="1"} 3.554618e+07
upf_session_tx_bytes{fseid="805306368",pdr="3"} 2.16742e+07
# HELP upf_session_tx_packets Shows the total number of packets for a given session in UPF
# TYPE upf_session_tx_packets gauge
upf_session_tx_packets{fseid="805306368",pdr="1"} 216745
upf_session_tx_packets{fseid="805306368",pdr="3"} 216742

@pudelkoM pudelkoM added the wip label Oct 5, 2021
core/modules/qos_measure.h Outdated Show resolved Hide resolved
Copy link
Contributor

@amarsri28 amarsri28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments -

@krsna1729
Copy link
Member

krsna1729 commented Oct 6, 2021

  • Rename the module as FlowMeasure
  • Test with multiple workers
  • Use multi-writer variant of the hash table if you want to support insertions from the workers i.e., key not present. Could be an init option insert_missing=true (vs single-writer variant if pre-populated or if using per worker hash table)
  • Have lock member within struct SessionStats to use when modifying the same entry from multiple workers. Exercised if init knob modify_lock=true. (Not needed if we have per worker hash table and aggregation is taken care by someone else)
  • Use ctr_id as the key, which is output of pdrLookup. Make agent side changes to insert the right ctr_id value in pdrLookup. Also have the agent pre-populate the key in this module.
    • Rename ctr_id to flow_id
    • Ideally make the key creation configurable at init like in the other modules.
  • Delete the counter module and replace its occurrences in up4.bess with this module.
    • Have a knob during init to say measure_latency=false. This way it can work as simple counter (preQoS, postQoS) as well. This will be helpful for the URR work.
  • Conditionally insert this module based on upf.json option like measure. measure_app and current one can be measure_upf
  • Add grafana dashboards and test with telemetry.sh

@krsna1729
Copy link
Member

when editing protobuf, run make pb to locally generate the go bindings

@pudelkoM pudelkoM force-pushed the qos-measurements branch 4 times, most recently from 946c75e to a1ad7a5 Compare October 15, 2021 18:14
@krsna1729
Copy link
Member

krsna1729 commented Oct 19, 2021

grafana dashboard 1 json

{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 2,
  "iteration": 1634620612878,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "upf_session_throughput_bps{fseid=~\"$fseid\", pdr=~\"$pdr\"}",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Throughput bps",
      "type": "timeseries"
    },
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "pps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 3,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "upf_session_throughput_pps{fseid=~\"$fseid\", pdr=~\"$pdr\"}",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Throughput pps",
      "type": "timeseries"
    },
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "id": 4,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "upf_session_drop_rate{fseid=~\"$fseid\", pdr=~\"$pdr\"}",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Drop rate",
      "type": "timeseries"
    },
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ns"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 27
      },
      "id": 6,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "upf_session_latency_ns{fseid=~\"$fseid\", pdr=~\"$pdr\", quantile=~\"$quantile\"}",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Latency",
      "type": "timeseries"
    },
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ns"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 36
      },
      "id": 5,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "multi"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "upf_session_observation_duration_ns{fseid=~\"$fseid\", pdr=~\"$pdr\"}",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Observation Duration",
      "type": "timeseries"
    }
  ],
  "refresh": false,
  "schemaVersion": 31,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": ".+",
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": "Prometheus",
        "definition": "label_values(fseid)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "fseid",
        "options": [],
        "query": {
          "query": "label_values(fseid)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "type": "query"
      },
      {
        "allValue": ".+",
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": "Prometheus",
        "definition": "label_values(pdr)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "pdr",
        "options": [],
        "query": {
          "query": "label_values(pdr)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "type": "query"
      },
      {
        "allValue": ".+",
        "current": {
          "selected": false,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": "Prometheus",
        "definition": "label_values(upf_session_latency_ns, quantile)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "quantile",
        "options": [],
        "query": {
          "query": "label_values(upf_session_latency_ns, quantile)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "UPF Session Metrics",
  "uid": "DwMjm2d7z",
  "version": 14
}

grafana dashboard 2 json

{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": null,
  "graphTooltip": 0,
  "id": 3,
  "iteration": 1634644669009,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "mappings": [],
          "max": 20000000000,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(upf_session_throughput_bps{fseid=~\"$fseid\", pdr=~\"$pdr\"})",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Bit Rate",
      "type": "stat"
    },
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "mappings": [],
          "max": 2000000,
          "min": 0,
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "pps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 6,
        "y": 0
      },
      "id": 3,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(upf_session_throughput_pps{fseid=~\"$fseid\", pdr=~\"$pdr\"})",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Packet Rate",
      "type": "stat"
    },
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 12,
        "y": 0
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(upf_session_drop_rate{fseid=~\"$fseid\", pdr=~\"$pdr\"})",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Drop Rate",
      "type": "stat"
    },
    {
      "datasource": "Prometheus",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "ns"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 18,
        "y": 0
      },
      "id": 5,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(upf_session_observation_duration_ns{fseid=~\"$fseid\", pdr=~\"$pdr\"})",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Observation Duration",
      "type": "stat"
    },
    {
      "cards": {
        "cardPadding": null,
        "cardRound": null
      },
      "color": {
        "cardColor": "#b4ff00",
        "colorScale": "sqrt",
        "colorScheme": "interpolateOranges",
        "exponent": 0.5,
        "mode": "spectrum"
      },
      "dataFormat": "timeseries",
      "datasource": "Prometheus",
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "heatmap": {},
      "hideZeroBuckets": false,
      "highlightCards": true,
      "id": 6,
      "legend": {
        "show": false
      },
      "reverseYBuckets": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "upf_session_latency_ns{fseid=~\"$fseid\", pdr=~\"$pdr\", quantile=~\"$quantile\"}",
          "format": "time_series",
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "UPF Session Latency",
      "tooltip": {
        "show": true,
        "showHistogram": false
      },
      "type": "heatmap",
      "xAxis": {
        "show": true
      },
      "xBucketNumber": null,
      "xBucketSize": null,
      "yAxis": {
        "decimals": null,
        "format": "short",
        "logBase": 1,
        "max": null,
        "min": null,
        "show": true,
        "splitFactor": null
      },
      "yBucketBound": "auto",
      "yBucketNumber": null,
      "yBucketSize": null
    }
  ],
  "refresh": "1m",
  "schemaVersion": 31,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": ".+",
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": "Prometheus",
        "definition": "label_values(fseid)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "fseid",
        "options": [],
        "query": {
          "query": "label_values(fseid)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "type": "query"
      },
      {
        "allValue": ".+",
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": "Prometheus",
        "definition": "label_values(pdr)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "pdr",
        "options": [],
        "query": {
          "query": "label_values(pdr)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "type": "query"
      },
      {
        "allValue": ".+",
        "current": {
          "selected": true,
          "text": [
            "All"
          ],
          "value": [
            "$__all"
          ]
        },
        "datasource": "Prometheus",
        "definition": "label_values(upf_session_latency_ns, quantile)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "quantile",
        "options": [],
        "query": {
          "query": "label_values(upf_session_latency_ns, quantile)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "UPF Session Metrics Summary",
  "uid": "cUFjx2dnz",
  "version": 12
}

@krsna1729
Copy link
Member

krsna1729 commented Oct 19, 2021

Dashboard 1

image
image
image

Dashboard 2

image

@krsna1729
Copy link
Member

krsna1729 commented Oct 19, 2021

diff --git a/pfcpiface/bess.go b/pfcpiface/bess.go
index a251007..054e9d0 100644
--- a/pfcpiface/bess.go
+++ b/pfcpiface/bess.go
@@ -666,6 +666,7 @@ func (b *bess) sim(u *upf, method string) {
 
                        precedence: 255,
 
+                       pdrID:     1,
                        fseID:     uint64(n3TEID + i),
                        ctrID:     i,
                        farID:     n3,
@@ -684,6 +685,7 @@ func (b *bess) sim(u *upf, method string) {
 
                        precedence: 1,
 
+                       pdrID:     2,
                        fseID:     uint64(n3TEID + i),
                        ctrID:     i,
                        farID:     n3,
@@ -705,6 +707,7 @@ func (b *bess) sim(u *upf, method string) {
 
                        precedence: 255,
 
+                       pdrID:     3,
                        fseID:     uint64(n3TEID + i),
                        ctrID:     i,
                        farID:     n6,
@@ -725,6 +728,7 @@ func (b *bess) sim(u *upf, method string) {
 
                        precedence: 1,
 
+                       pdrID:     4,
                        fseID:     uint64(n3TEID + i),
                        ctrID:     i,
                        farID:     n9,

@krsna1729 krsna1729 force-pushed the qos-measurements branch 3 times, most recently from 6d04e61 to fccf3be Compare October 25, 2021 05:37
Comment on lines 460 to 466
if statsIn.Fseid != statsOut.Fseid || statsIn.Pdr != statsOut.Pdr {
continue
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krsna1729 We'd like to look up the right PDR here and use the IP addresses from it as a prometheus label. Unfortunately I have not yet found a way to access the pfcp session which keeps the slice of pdrs.
Any ideas?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the bess layer you wont find them. You can find it in PFCP layer https://github.com/omec-project/upf-epc/blob/master/pfcpiface/sessions.go#L18

Maybe you can use the setInfo call to setup what you need in bess struct pointing to the PFCPConn
https://github.com/omec-project/upf-epc/blob/master/pfcpiface/conn.go#L164
https://github.com/omec-project/upf-epc/blob/master/pfcpiface/bess.go#L71

conf/up4.bess Outdated Show resolved Hide resolved
pfcpiface/bess.go Outdated Show resolved Hide resolved
@pudelkoM pudelkoM force-pushed the qos-measurements branch 2 times, most recently from b0ae1b8 to 264e676 Compare November 22, 2021 18:17
@pudelkoM
Copy link
Member Author

pudelkoM commented Nov 22, 2021

I think I addressed all immediate concerns. The entire module is now optional (measure_flow in json config) and will not affect pipelines when not enabled. It remains disabled by default.

From ONF side these changes are sufficient, any (e.g. performance) improvements or generalization efforts can be done when needed.

@pudelkoM pudelkoM removed the wip label Nov 22, 2021
ccascone
ccascone previously approved these changes Nov 22, 2021
Copy link
Contributor

@ccascone ccascone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Meets the requirements for Aether 1.6.

@krsna1729
Copy link
Member

squash the commits

@krsna1729
Copy link
Member

Make necessary updates to the dashboards to get them working with the latest changes in the prometheus code

@pudelkoM
Copy link
Member Author

Make necessary updates to the dashboards to get them working with the latest changes in the prometheus code

The change to report counters instead of rates makes plotting bps/pps/drop_rate more complex. Unfortunately I don't know Prometheus well enough to make that change happen. There is also a pending discussion with the OPs team about the exact metrics and their format.

@pudelkoM pudelkoM changed the title Implement QoS Monitoring Implement QoS application monitoring Nov 23, 2021
@pudelkoM pudelkoM merged commit d81187b into master Nov 23, 2021
@pudelkoM pudelkoM deleted the qos-measurements branch November 23, 2021 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants