Pyroscope
Pyroscope is an open-source continuous profiling database that captures application resource usage down to the line number, designed for developers and SREs who need production-level visibility into CPU, memory, lock contention, and goroutine behavior.
Publisher review
Pyroscope is an open-source continuous profiling database that captures application resource usage down to the line number, designed for developers and SREs who need production-level visibility into CPU, memory, lock contention, and goroutine behavior. Founded in 2021 by Ryan Perry and Dmitry Filimonov, it merged with Grafana Labs' Phlare project in 2023 to become Grafana Pyroscope, now natively integrated into the Grafana observability stack. The tool targets teams running Kubernetes workloads who want to correlate profiling data with metrics, logs, and traces, enabling them to identify performance regressions and optimize infrastructure spend without requiring separate staging environments.
Pyroscope captures stacktraces at a regular interval of roughly 100 Hz and samples memory allocations and lock contention events, temporarily storing this data in memory before sending it to the server every 15 seconds by default. It uses a custom storage engine and proprietary compression algorithms to store profiling data efficiently, with a memory overhead typically less than 50 MB per pod—often so minimal that it becomes challenging to measure accurately. The system is horizontally scalable, supports highly available configurations for 100% uptime during upgrades or machine failures, and provides durable long-term storage. Key visualization features include flame graphs and profile comparison, and it fully integrates with Grafana to correlate profiles with other observability signals.
In the competitive landscape of continuous profiling, Pyroscope competes with Datadog, Google Cloud Profiler, Polar Signals, Parca, Dynatrace, New Relic, Sentry, and Elastic Universal Profiling. Its open-source nature and Grafana-native integration differentiate it from proprietary solutions like Datadog and Dynatrace, while its consistent architecture with Loki, Mimir, and Tempo reduces the learning curve for teams already using Grafana's database ecosystem. Compared to Polar Signals and Parca, Pyroscope emphasizes high availability and durable storage as core features, though all tools face similar challenges in capturing production profiles without impacting application performance.
A key trade-off is that if the Pyroscope backend is down or slow, the profiler discards new profiles to prevent running out of memory, prioritizing application stability over data completeness. While the memory overhead is very low, it scales sublinearly with CPU count, meaning high-CPU applications may see slightly higher overhead. The tool requires running a dedicated backend server for storage and querying, adding operational complexity for teams not already using Grafana. Additionally, because profiling data is sent in batches every 15 seconds, there is a slight delay in data availability, which may not suit real-time debugging scenarios. Pricing is not explicitly stated in the sources, but Grafana Cloud offers a managed version with free and paid tiers.
How it works
-
Continuous profiling
Captures application resource usage in production at regular intervals (~100 Hz) without requiring manual triggers or staging environments.
-
CPU profiling
Samples CPU stacktraces to identify which functions consume the most processor time, helping pinpoint performance bottlenecks.
-
Memory profiling
Samples memory allocations to detect leaks and high-usage patterns, with overhead typically under 50 MB per pod.
-
Lock and contention profiling
Captures mutex and block contention events to reveal synchronization issues that degrade application throughput.
-
Flame graphs
Visualizes profiling data as interactive flame graphs, allowing drill-down into specific code paths and line numbers.
-
Profile comparison
Enables side-by-side comparison of two profiles to identify performance regressions or improvements over time.
-
Kubernetes workflows
Designed for Kubernetes deployments with automatic pod discovery and low-overhead profiling that scales with cluster size.
Strengths and trade-offs
Strengths
- Memory overhead is typically less than 50 MB per pod, often so minimal it becomes challenging to measure accurately.
- Uses a custom storage engine and compression algorithms to store profiling data efficiently, enabling durable long-term storage.
- Horizontally scalable architecture allows easy scaling to handle more incoming profiles without reconfiguration.
- Fully compatible with Grafana, enabling correlation of profiling data with metrics, logs, and traces in a single dashboard.
Trade-offs
- If the backend is down or slow, the profiler discards new profiles to prevent running out of memory, potentially losing data.
- Requires running a dedicated backend server for storage and querying, adding operational overhead for teams not using Grafana.
- Profiling data is sent in batches every 15 seconds, introducing a slight delay that may not suit real-time debugging needs.
- Memory overhead scales sublinearly with CPU count, so high-CPU applications may see slightly higher resource consumption.
Pricing context
Not explicitly stated in the sources; Grafana Cloud offers a managed version with free and paid tiers, but specific pricing for Pyroscope is not detailed.
Getting started with Pyroscope
-
Install Pyroscope server
Download the latest Pyroscope release from GitHub and run the server binary on a dedicated machine or container. Use the default configuration to start storing profiling data, ensuring the server is accessible from your application pods.
-
Add Pyroscope agent to app
Instrument your application by adding the Pyroscope agent library for your language (Go, Java, Python, Ruby, or Node.js). Configure the agent with the server endpoint URL and set the profiling interval to 100 Hz for CPU sampling.
-
Configure profiling types
Set environment variables or code parameters to enable CPU, memory, lock contention, and goroutine profiling as needed. Adjust the memory allocation sampling rate to balance detail with overhead, typically keeping overhead under 50 MB per pod.
-
View flame graphs in Grafana
Open Grafana and add Pyroscope as a data source using the server URL. Navigate to the Explore view, select your application from the service dropdown, and choose a time range to display interactive flame graphs of resource usage.
-
Compare profiles for regressions
In the Pyroscope UI or Grafana, select two profiles from different time periods or deployments. Use the side-by-side comparison view to identify functions with increased CPU or memory consumption, then drill down to the line number for optimization.
Frequently Asked Questions
What is Pyroscope and how does it work for continuous profiling?
Pyroscope is an open-source continuous profiling database that captures application resource usage like CPU and memory down to the line number. It samples stacktraces at roughly 100 Hz and sends data to a server every 15 seconds, enabling production visibility without staging environments.
How does Pyroscope integrate with Grafana?
Pyroscope merged with Grafana Labs' Phlare project in 2023 to become Grafana Pyroscope, now natively integrated into the Grafana observability stack. This allows correlating profiling data with metrics, logs, and traces in a single dashboard, reducing the learning curve for Grafana users.
What is the memory overhead of running Pyroscope on Kubernetes?
Pyroscope's memory overhead is typically less than 50 MB per pod, often so minimal it becomes challenging to measure accurately. However, it scales sublinearly with CPU count, so high-CPU applications may see slightly higher overhead, though still very low for production use.
What are the main features of Pyroscope for profiling?
Pyroscope offers continuous profiling for CPU, memory, and lock contention, with visualization via interactive flame graphs and profile comparison. It supports Kubernetes workflows with automatic pod discovery, and its custom storage engine enables efficient long-term storage and horizontal scalability.
How does Pyroscope compare to Datadog and other profiling tools?
Pyroscope is open-source and natively integrates with Grafana, differentiating it from proprietary tools like Datadog and Dynatrace. Compared to Polar Signals and Parca, it emphasizes high availability and durable storage as core features, though all face similar challenges in production profiling without performance impact.
What are the trade-offs of using Pyroscope for production profiling?
If the Pyroscope backend is down or slow, the profiler discards new profiles to prevent running out of memory, prioritizing stability over data completeness. Data is sent in batches every 15 seconds, introducing slight delay, and a dedicated backend server adds operational complexity for non-Grafana teams.
Alternatives
How Pyroscope compares
Direct head-to-head against 3 competitors. Picked by 7wData.
Pyroscope
- Pricing
- Not explicitly stated in the sources; Grafana Cloud offers a managed version with free and paid tiers, but specific pricing for Pyroscope is not detailed.
- Target
- Pyroscope is an open-source continuous profiling database that captures application resource usage down to the line number, designed for developers and SREs who need production-level
- Strength
- Memory overhead is typically less than 50 MB per pod, often so minimal it becomes challenging to measure accurately.
- Watch for
- If the backend is down or slow, the profiler discards new profiles to prevent running out of memory, potentially losing data.
Datadog
- Pricing
- Usage-based; starts at $15/host/month for Pro, $23/host/month for Enterprise
- Target
- DevOps and SRE teams needing full-stack observability with APM, logs, and profiling
- Deployment
- SaaS, agent-based
- Strength
- Unified observability platform with built-in continuous profiling and APM correlation
- Watch for
- Pricing can escalate quickly with data volume and host count
New Relic
- Pricing
- Free tier with 100GB/month; paid starts at $0.30/GB ingested
- Target
- Developers and platform teams seeking integrated profiling within an APM suite
- Deployment
- SaaS, agent-based
- Strength
- Deep APM integration with code-level profiling and distributed tracing
- Watch for
- Complex pricing model with data ingestion and user-based costs
Polar Signals Cloud
- Pricing
- Usage-based; contact sales for custom pricing
- Target
- Teams wanting zero-instrumentation eBPF profiling for production environments
- Deployment
- SaaS, agent-based
- Strength
- Zero code changes with eBPF-based profiling across multiple languages
- Watch for
- Commercial-only product with limited query capabilities compared to open-source alternatives
User reviews
No user reviews yet. Be the first to write one.
Sources
Reporting on this tool draws on these publicly available sources.