|
| 1 | +# OTLP Profiling Benchmark Setup |
| 2 | + |
| 3 | +This setup captures real-world OTLP profiling data to measure the impact of protocol changes on in-memory and wire size. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +We run two workloads on a single-node minikube cluster: |
| 8 | + |
| 9 | +- **[OpenTelemetry Demo](https://github.com/open-telemetry/opentelemetry-demo)** (Astronomy Shop): A fictional e-commerce application composed of ~15 microservices written in Go, Java, Python, .NET, Node.js, Rust, PHP, and more. Generates diverse profiling data across different runtimes and frameworks. |
| 10 | +- **[NetBox](https://github.com/netbox-community/netbox)**: A network infrastructure management platform (IPAM/DCIM) built with Django. Runs as a gunicorn WSGI application that spawns multiple worker processes—useful for evaluating profiler behavior with forking Python processes. |
| 11 | + |
| 12 | +A custom OpenTelemetry Collector with the [eBPF profiler](https://github.com/open-telemetry/opentelemetry-ebpf-profiler) captures profiles from all processes on the node and writes them to disk. |
| 13 | + |
| 14 | +## Prerequisites |
| 15 | + |
| 16 | +- Ubuntu 24.04 VM (tested on AWS c6a.8xlarge: 32 vCPUs, 64 GiB) |
| 17 | +- Sudo access |
| 18 | + |
| 19 | +## Setup |
| 20 | + |
| 21 | +### 1. Install dependencies |
| 22 | + |
| 23 | +```bash |
| 24 | +./install.sh |
| 25 | +``` |
| 26 | + |
| 27 | +This installs Docker, minikube, kubectl, helm, and configures the system for Kubernetes. |
| 28 | + |
| 29 | +After installation, either log out and back in, or run `newgrp docker` to activate Docker group membership. |
| 30 | + |
| 31 | +### 2. Start the cluster |
| 32 | + |
| 33 | +```bash |
| 34 | +minikube start --driver=none |
| 35 | +``` |
| 36 | + |
| 37 | +### 3. Deploy workloads |
| 38 | + |
| 39 | +**OpenTelemetry Demo:** |
| 40 | + |
| 41 | +```bash |
| 42 | +kubectl create namespace otel-demo |
| 43 | +helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts |
| 44 | +helm install otel-demo open-telemetry/opentelemetry-demo -n otel-demo --values k8s/opentelemetry-demo/values.yaml |
| 45 | +``` |
| 46 | + |
| 47 | +**NetBox:** |
| 48 | + |
| 49 | +```bash |
| 50 | +kubectl create namespace netbox-bench |
| 51 | +helm install netbox-bench oci://ghcr.io/netbox-community/netbox-chart/netbox -n netbox-bench |
| 52 | +``` |
| 53 | + |
| 54 | +NetBox takes ~10 minutes to start (database migrations). Wait for all pods to be ready: |
| 55 | + |
| 56 | +```bash |
| 57 | +kubectl get pods -n netbox-bench -w |
| 58 | +``` |
| 59 | + |
| 60 | +Then start the load generator: |
| 61 | + |
| 62 | +```bash |
| 63 | +kubectl apply -f k8s/netbox/load-generator.yaml |
| 64 | +``` |
| 65 | + |
| 66 | +### 4. Deploy the collector |
| 67 | + |
| 68 | +Build a custom collector pinned to a specific commit of the eBPF profiler: |
| 69 | + |
| 70 | +```bash |
| 71 | +./build-custom-collector.sh |
| 72 | +``` |
| 73 | + |
| 74 | +Deploy it: |
| 75 | + |
| 76 | +```bash |
| 77 | +kubectl create namespace otel |
| 78 | +kubectl apply -f k8s/opentelemetry-collector/ |
| 79 | +``` |
| 80 | + |
| 81 | +## Output |
| 82 | + |
| 83 | +Profiles are written to `/var/lib/otel-profiles/profiles.proto` in the [file exporter format](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/fileexporter#file-format). |
| 84 | + |
| 85 | +## Notes |
| 86 | + |
| 87 | +- The collector runs as a DaemonSet with privileged access (required for eBPF). |
| 88 | +- We use a custom Kubernetes manifest because the collector Helm charts don't yet support the profiling distribution. |
| 89 | +- The `builder-manifest.yaml` pins the eBPF profiler to a [specific commit](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/tree/fd60ef3f4a81577e4269bf821b11b38b81fadb52) for reproducibility. It includes [#889](https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/889) which makes collector logs more configurable. |
0 commit comments