Code Monkey home page Code Monkey logo

edge-metrics-measurements's Introduction

Measuring metrics collection footprint for edge use cases

In the context of resource constraint environments like edge deployments, acquiring data for observability purposes is challenging. Especially in the metrics area, running a TSDB like Prometheus alongside the workloads, which collects (scrapes) metrics and stores them for querying and alerting is not an option. The only remaining possibility often is a pure scrape-and-forward approach, where metrics are immediately sent to a storage location outside of the cluster or device where the monitored workloads run.

This project sets up different configurations and combinations of OpenTelemetry Collector and Prometheus Agent with the goal to measure and compare their resource footprint in different situations. Avalanche is used as the metrics producer and Prometheus as the metrics database (both not part of the measurment).

Configurations

The following setups are measured (measured part in bold):

  1. Avalanche -> /metrics <- Prometheus Agent -> remote_write -> Prometheus
  2. Avalanche -> /metrics <- OTel Collector -> OTLP -> OTel Collector (-> remote_write -> Prometheus)
  3. Avalanche -> /metrics <- OTel Collector -> remote_write -> Prometheus

How to run it

The scenarios' Docker Compose setups can be found in the scenario_[1-3] directories. To run a scenario execute

docker-compose up

in one of the directories. This runs the above listed components plus a cAdvisor instance. The receiving Prometheus instance is set up to scrape cAdvisor and can be queried for container metrics. This is the basis for measurement.

The number of series which Avalanche generates can be changed by overriding the METRICS_COUNT environment variable which is set in each scenario's .env file.

Note 1: The actual number of active series is METRICS_COUNT * <# of series>. The latter is currently hardcoded to a value of 10 (see the compose files).

Note 2: The refresh intervals for lables in Avalanche are currently hardcoded to a value of 10000 seconds in order to have a constant number of active series for the whole measurement.

Get the results

When the scenario has run for some time one can assume that components have stabilized. Observation shows that this takes around 5 to 10 minutes.

You can run

hack/get-result.sh

to populate a CSV file in the current directory with the results of the current run (averages over the the last 5 min). The script can be run subsequently to add more result lines.

PromCon EU 2023 talk

Results have been shown in lightning talk at PromCon EU 2023 in Berlin. Find the slides here.

edge-metrics-measurements's People

Contributors

danielm0hr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.