Grafana Pyroscope vs. Parca: Continuous Profiling für Kubernetes
Metriken zeigen was langsam ist. Traces zeigen wo im Code das Problem liegt. Aber erst Continuous Profiling zeigt, warum Code CPU-Zeit und Memory verbraucht — kontinuierlich, ohne manuelles Aktivieren von Profiling-Sessions. Grafana Pyroscope und Parca sind die führenden Open-Source-Lösungen in diesem Bereich. Dieser Vergleich zeigt Unterschiede in Architektur, eBPF-Unterstützung, Grafana-Integration und Kubernetes-Deployment.
Was ist Continuous Profiling?
Profiling ist bekannt aus der Entwicklung: pprof für Go, cProfile für Python, Java Flight Recorder. Aber klassisches Profiling ist reaktiv und teuer — man aktiviert es wenn ein Problem auftaucht, oft mit hohem Overhead.
Continuous Profiling läuft dauerhaft mit minimalem Overhead (~1–3 % CPU) und sammelt Profiling-Daten im Hintergrund. Das Ergebnis: Flamegraphen, die über Tage hinweg verglichen werden können. Ein Deploy, der gestern 10 % mehr CPU verbraucht als heute? Sichtbar ohne Incident.
Die Observability-Lücke:
- Metrics (Prometheus): Zahlen über das System — "HTTP-Latenz ist 300ms"
- Traces (Jaeger, Tempo): Einzelne Request-Pfade — "Datenbankabfrage dauert 250ms"
- Profiles (Pyroscope, Parca): Code-Ebene — "Funktion
parseJSON()verbraucht 40 % CPU"
Grafana Pyroscope
Pyroscope wurde 2020 als eigenständiges Projekt gestartet und 2023 von Grafana Labs akquiriert — der gleiche Weg wie Loki und Tempo. Seitdem ist es fest in den Grafana-Stack integriert.
Architektur
Pyroscope folgt dem Prometheus-Modell: Ein zentraler Server empfängt Profiling-Daten, speichert sie effizient und stellt eine Query-API bereit. Daten werden via Push (Agenten senden Daten) oder Pull (Server scraped Targets) gesammelt.
# Pyroscope Helm-Installation
helm repo add grafana https://grafana.github.io/helm-charts
helm install pyroscope grafana/pyroscope --namespace monitoring --set persistence.enabled=true --set persistence.size=50Gi
Sprach-Support
Pyroscope unterstützt viele Sprachen via SDKs und eBPF:
| Sprache | Methode | Overhead |
|---|---|---|
| Go | Push SDK / eBPF | <1 % |
| Python | Push SDK | 1–3 % |
| Java | Push SDK (JVM Agent) | 1–2 % |
| .NET | Push SDK | 1–2 % |
| Ruby | Push SDK | 2–4 % |
| Rust | eBPF | <1 % |
| Node.js | Push SDK | 1–3 % |
| Beliebig | eBPF (sprachunabhängig) | <0.5 % |
eBPF-Profiling mit Grafana Alloy
Pyroscope's eBPF-Integration läuft über Grafana Alloy (früher Grafana Agent):
# Alloy-Konfiguration für eBPF-Profiling
pyroscope.scrape "default" {
targets = [{"__address__" = "localhost:4040", "service_name" = "my-app"}]
forward_to = [pyroscope.write.endpoint.receiver]
profiling_config {
profile.process_cpu {
enabled = true
}
}
}
pyroscope.write "endpoint" {
endpoint {
url = "http://pyroscope:4040"
}
}
Grafana-Integration
Die Pyroscope-Integration in Grafana ist exzellent — nahtlos, da beide aus gleichem Haus:
# Flamegraph-Query in Grafana
{service_name="my-app", __name__="process_cpu"}
Grafana 10+ zeigt Pyroscope-Flamegraphen nativ im Explore-Panel. Besonders mächtig: Traces-to-Profiles-Verknüpfung — aus einem Tempo-Trace direkt zum Profil des langsamen Calls.
Parca: CNCF-Continuous-Profiling
Parca wurde von Polar Signals (dem Hersteller, gegründet 2021 vom Prometheus-Mitgründer Frederic Branczyk) entwickelt und ist seit 2022 CNCF Sandbox Project. Es ist von Anfang an für Kubernetes und eBPF designed.
Architektur
Parca besteht aus zwei Komponenten:
- Parca Server: Empfängt, speichert und queried Profiling-Daten (nutzt Parquet-Format)
- Parca Agent: eBPF-basierter Daemonset im Cluster — kein SDK nötig
# Parca Agent als DaemonSet
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: parca-agent
namespace: monitoring
spec:
selector:
matchLabels:
app: parca-agent
template:
spec:
hostPID: true # Nötig für eBPF
containers:
- name: parca-agent
image: ghcr.io/parca-dev/parca-agent:v0.33.0
securityContext:
privileged: true # eBPF-Zugriff
args:
- --http-address=:7071
- --log-level=info
- --store-address=parca.monitoring.svc.cluster.local:7070
- --insecure
eBPF-First-Design
Parca setzt vollständig auf eBPF — ohne SDK. Das bedeutet:
- Kein Code-Änderung nötig
- Funktioniert für jede Sprache/Runtime im Container
- Overhead unter 0,5 %
Parca Agent profilt alle Prozesse auf einem Node:
- CPU-Profiling über eBPF
perf_events - Memory-Profiling (Beta)
- Stack-Traces werden im Kernel gesammelt
Parca Query Language (ParcaQL)
Parca nutzt eine eigene PromQL-inspirierte Query-Sprache:
parca_agent_cpu:samples:count:cpu:nanoseconds
{namespace="production", container="api-server"}
| rate[5m]
Die Flamegraph-UI ist eingebaut, schlank und schnell ladend.
Direkter Vergleich
| Feature | Grafana Pyroscope | Parca |
|---|---|---|
| Ursprung | Pyroscope (akquiriert 2023) | Polar Signals / CNCF Sandbox |
| eBPF-Agent | Via Grafana Alloy | Parca Agent (native) |
| SDK-Support | Umfangreich (Go, Java, .NET...) | Minimal (eBPF first) |
| Grafana-Integration | Nativ / exzellent | Via Grafana Plugin |
| Storage-Format | Proprietär + Parquet | Parquet (Apache) |
| Multi-Tenancy | Ja | Ja |
| Horizontal Scaling | Ja (microservices mode) | Begrenzt |
| Remote Write | Ja (Prometheus-kompatibel) | Ja |
| Cloud-Angebot | Grafana Cloud (Pyroscope) | Polar Signals Cloud |
| Lernkurve | Mittel (Grafana-Kenntnisse nötig) | Niedrig |
| Community | Sehr groß (Grafana-Ökosystem) | Wächst (CNCF) |
| Produktionsreife | Hoch | Mittel-Hoch |
Kubernetes-Deployment im Vergleich
Pyroscope auf Kubernetes (Helm)
# values.yaml für Pyroscope
pyroscope:
replicaCount: 1 # oder mehr für HA
persistence:
enabled: true
size: 50Gi
resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: 2
memory: 2Gi
# Grafana Alloy für eBPF-Collection
alloy:
enabled: true
controller:
type: daemonset
Parca auf Kubernetes (Helm)
helm repo add parca https://charts.parca.dev
helm install parca parca/parca --namespace monitoring --set parca-agent.enabled=true
# Parca PersistentVolumeClaim
persistence:
enabled: true
size: 20Gi
storageClass: longhorn # oder andere Storage-Klasse
Integration mit Observability-Stack
Pyroscope fügt sich nahtlos in den Grafana-Stack ein:
- Tempo: Traces → Profile Correlation (SpanID verknüpft mit Profile-Segment)
- Loki: Logs → Profile-Link bei langsamen Requests
- Prometheus: Metriken mit Profilen verknüpfen (Exemplars)
Dieses "Three Pillars + Profiling"-Konzept ist ein starkes Argument für Pyroscope im bestehenden Grafana-Stack.
Parca bietet Grafana-Integration via Plugin, ist aber nicht so tief integriert. Wer bereits Grafana Tempo für Distributed Tracing nutzt, profitiert stärker von Pyroscope.
Performance-Overhead im Vergleich
In Benchmarks zeigen beide Tools ähnlich niedrigen Overhead:
| Szenario | Pyroscope (eBPF) | Parca Agent |
|---|---|---|
| CPU-Overhead | 0.3–0.8 % | 0.2–0.6 % |
| Memory (Agent) | ~100–200 MB | ~80–150 MB |
| Netzwerk | ~10–50 KB/s pro Node | ~5–30 KB/s pro Node |
| Storage (pro Node/Tag) | ~1–5 GB | ~0.5–3 GB |
eBPF-basiertes Profiling ist in beiden Fällen deutlich effizienter als SDK-basiertes Profiling (~3× weniger Overhead).
Wann Pyroscope, wann Parca?
Grafana Pyroscope bevorzugen wenn:
- Bereits Grafana, Loki, Tempo im Einsatz sind
- Traces-to-Profiles-Correlation gewünscht ist
- SDK-Support für Go/Java/.NET benötigt wird
- Grafana Cloud als Option in Frage kommt
- Horizontales Scaling nötig ist
Parca bevorzugen wenn:
- eBPF-First-Ansatz ohne jede Code-Änderung gefragt ist
- CNCF-Projektstatus Priorität hat
- Einfacheres Deployment bevorzugt wird
- Kein Grafana-Stack vorhanden ist
- Minimaler Vendor-Lock-in wichtig ist
Fazit
Beide Tools bringen Continuous Profiling erfolgreich auf Kubernetes. Grafana Pyroscope ist die stärkere Wahl für Teams, die bereits im Grafana-Ökosystem sind — die Integration mit Tempo, Loki und Prometheus ist einzigartig. Parca punktet mit seinem eBPF-First-Ansatz und CNCF-Status, ist aber noch weniger tief in bestehende Stacks integriert.
2026 ist Continuous Profiling kein Nischen-Thema mehr. Wer bereits Prometheus für Monitoring und Grafana Tempo für Tracing einsetzt, sollte Pyroscope als natürliche Ergänzung evaluieren.
Weiterführende Artikel
- Grafana Tempo vs. Jaeger: Distributed Tracing auf Kubernetes im Vergleich
- Victoria Metrics vs. Prometheus: Time-Series-Monitoring im Vergleich
- Falco vs. Tetragon: Kubernetes Runtime Security mit eBPF im Vergleich
- Cilium vs. Calico: Kubernetes CNI-Plugins im Vergleich
- Grafana k6 vs. Locust: Load Testing und Performance Testing im Vergleich