forked from grafana/pyroscope
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOC] Add intro material for Pyroscope (grafana#2839)
* Add intro material * Apply suggestions from code review * Update content
- Loading branch information
1 parent
f095b8d
commit 31ec2d0
Showing
10 changed files
with
285 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
docs/sources/ingest-and-analyze-profile-data/pyroscope-ui.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: Use Pyroscope UI | ||
menuTitle: Use the Pyroscope UI | ||
description: How to use the Pyroscope UI to analyze performance of your applications. | ||
weight: 40 | ||
keywords: | ||
- pyroscope | ||
- performance analysis | ||
- flamegraphs | ||
--- | ||
|
||
## Pyroscope: Continuous Profiling in Action | ||
|
||
![Screenshots of Pyroscope's UI](https://grafana.com/static/img/pyroscope/pyroscope-ui-diff-2023-11-30.png) | ||
|
||
Pyroscope's UI is designed to make it easy to visualize and analyze profiling data. | ||
There are several different modes for viewing, analyzing, uploading, and comparing profiling data. | ||
We will go into more detail about these modes in the [Pyroscope UI documentation]. | ||
For now, it's important to note that one of the major benefits of continuous profiling is the ability to compare and diff profiling data from two different queries: | ||
|
||
- Comparing two different git commits before and after a code change | ||
- Comparing Staging vs production environments to identify differences in performance | ||
- Comparing performance between two different a/b tests or feature flag experiments | ||
- Comparing memory allocations between two different time periods before and after a memory leak | ||
- etc | ||
|
||
With traditional profiling getting any of this information is much more difficult to organize, properly label, share, or store for later analysis. With Pyroscope, all of this is just a matter of writing the two queries you'd like to compare and clicking a button. | ||
|
||
This UI will also expand over time to better help dig deeper into the data and provide more insights into your application. | ||
|
||
## Seamless integration with observability tools | ||
|
||
![Flowchart showing Pyroscope integration with other tools](https://grafana.com/static/img/pyroscope/grafana-pyroscope-dashboard-2023-11-30.png) | ||
|
||
Pyroscope enhances its value through seamless integration with leading observability tools like Grafana, Prometheus, and Loki. This integration facilitates deeper insights into application performance and aids in addressing issues identified through other monitoring methods. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,36 @@ | ||
--- | ||
title: What is Pyroscope? | ||
menuTitle: What is Pyroscope? | ||
title: Introduction | ||
menuTitle: Introduction | ||
description: Learn about Pyrsocope and profiling. | ||
weight: 10 | ||
draft: true | ||
keywords: | ||
- Pyroscope | ||
- Profiling | ||
--- | ||
|
||
<!-- This is placeholder page while we get the content written. --> | ||
|
||
# What is Pyroscope? | ||
# Introduction | ||
|
||
<!-- The concept title is required. Use a noun-based title that includes the name of the product or feature. For example: Alerting fundamentals. | ||
Grafana Pyroscope is a multi-tenant continuous profiling aggregation system, aligning its architectural design with Grafana Mimir, Grafana Loki, and Grafana Tempo. It facilitates the ingestion, storage, and querying of profiles and seamlessly integrates with Grafana, enabling a cohesive correlation of profiling data with existing metrics, logs, and traces. | ||
|
||
A concept provides an overview and background information to help users understand a product, interface, or task. Concepts answer the question “what is it?”. Readers learn about features through concepts. Concepts do not include step-by-step procedures or reference material but often link to those materials. | ||
Engineers utilizing Pyroscope gain the ability to delve deep into the performance attributes and resource demands of their applications. Boasting an intuitive interface coupled with a vivid data visualization, Pyroscope transforms raw profiling data into readily actionable insights. | ||
|
||
Refer to the [Concept topic documentation](https://grafana.com/docs/writers-toolkit/writing-guide/topic-types/concept/) for guidelines on writing a concept topic. | ||
--> | ||
## Why Pyroscope | ||
|
||
Introduce the concept. | ||
Continuous profiling helps teams to quickly identify performance bottlenecks and optimize their applications. | ||
With Grafana Pyroscope, teams can easily profile their applications in production with minimal overhead. | ||
Starting with system-wide observability and drilling down to actionable code-level insights allows teams to identify performance issues in context no matter where they occur, so they can optimize their applications with precision. | ||
|
||
<!-- The introduction is required. Add an introduction to the concept to summarize the purpose or main point of the feature. --> | ||
## Core functionality | ||
|
||
## Sections | ||
With Pyroscope, you get access to the core profiling functionality, which you can use to find performance bottlenecks and optimize applications. The core functionality includes: | ||
|
||
<!-- Add sections replacing **Sections** with subtitles for each section. Concept topics or sections explain what and why. They do not explain how. If you are a new user, you might look for concept information to learn about what Grafana is, why it might be useful to you, and what the general workflow is. --> | ||
- Minimal CPU overhead and efficient compression ensure optimal performance. | ||
- Architecture consistent with Loki, Mimir, and Tempo, promoting a smoother user experience. | ||
- Horizontally scalable | ||
- Reliable: Highly available setup ensures consistent uptime, even amidst upgrades or system failures. | ||
- Multi-tenancy Support: makes it possible to run one database for multiple independent teams or business units. | ||
- Cost Effective at Scale: Utilizes object storage, which allows extensive historical data storage without significant costs. | ||
- Advanced Analysis UI: Provides an advanced UI, high-cardinality tag/label handling, and the ability to differentiate performance between tags/labels and time intervals. | ||
|
||
## Useful links | ||
|
||
<!-- Link out to task or reference topics related to the concept. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: When to use continuous profiling | ||
menuTitle: When to use continuous profiling | ||
description: Discover the benefits of continuous profiling and its role in modern application performance analysis. | ||
weight: 20 | ||
keywords: | ||
- pyroscope | ||
- phlare | ||
- continuous profiling | ||
- flamegraphs | ||
--- | ||
|
||
## When to use continuous profiling | ||
|
||
**Continuous profiling** is a systematic method of collecting and analyzing performance data from production systems. | ||
|
||
Traditionally, profiling has been used more as an ad-hoc debugging tool in languages like Go and Java. | ||
You are probably used to running a benchmark tool locally and getting a pprof file in Go or maybe connecting into a misbehaving prod instance and pulling a flamegraph from a JFR file in Java. | ||
This is great for debugging but not so great for production. | ||
|
||
![example flamegraph](https://grafana.com/static/img/pyroscope/pyroscope-ui-single-2023-11-30.png) | ||
|
||
Continuous profiling is a modern approach which is safer and more scalable for production environments. | ||
It makes use of low overhead sampling to collect profiles from production systems and stores them in a database for later analysis. | ||
You can get a more holistic view of your application and how it behaves in production. | ||
|
||
## Benefits | ||
|
||
![Diagram showing 3 benefits of continuous profiling](https://grafana.com/static/img/pyroscope/profiling-use-cases-diagram.png) | ||
|
||
Why prioritize continuous profiling? | ||
|
||
1. **In-Depth Code Insights:** It provides granular, line-level insights into how application code utilizes resources, offering the most detailed view of application performance. | ||
2. **Complements Other Observability Tools:** Continuous profiling fills critical gaps left by metrics, logs, and tracing, creating a more comprehensive observability strategy. | ||
3. **Proactive Performance Optimization:** Regular profiling enables teams to proactively identify and resolve performance bottlenecks, leading to more efficient and reliable applications. | ||
|
||
## Use cases | ||
|
||
![Infographic illustrating key business benefits](https://grafana.com/static/img/pyroscope/cost-cutting-diagram.png) | ||
|
||
Adopting continuous profiling with tools like Pyroscope can lead to significant business advantages: | ||
|
||
1. **Reduced operational costs:** Optimization of resource usage can significantly cut down cloud and infrastructure expenses | ||
2. **Reduced latency:** Identifying and addressing performance bottlenecks leads to faster and more efficient applications | ||
3. **Enhanced incident management:** Faster problem identification and resolution, reducing Mean Time to Resolution (MTTR) and improving end-user experience | ||
|
||
### Reduce operational costs | ||
|
||
Pyroscope's low-overhead profiling enables precise optimization of resource usage, directly impacting various cost centers in technology infrastructure. | ||
By providing in-depth insights into application performance, Pyroscope allows teams to identify and eliminate inefficiencies, leading to significant savings in areas like observability, incident management, messaging/queuing, deployment tools, and infrastructure. | ||
|
||
### Reduced latency | ||
|
||
Pyroscope plays a pivotal role in reducing application latency by identifying performance bottlenecks at the code level. | ||
This granular insight allows for targeted optimization, leading to faster application response times, improved user experience, and consequently, better business outcomes like increased customer satisfaction and revenue. | ||
|
||
### Enhanced incident management | ||
|
||
Pyroscope streamlines incident management by offering immediate, actionable insights into application performance issues. | ||
With continuous profiling, teams can quickly pinpoint the root cause of an incident, reducing the mean time to resolution (MTTR) and enhancing overall system reliability and user satisfaction. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "Flamegraphs: Visualizing performance data" | ||
menuTitle: Flamegraphs | ||
description: Learn about flamegraphs to help visualize performance data | ||
weight: 100 | ||
keywords: | ||
- Pyroscope | ||
- Profiling | ||
--- | ||
|
||
# Flamegraphs: Visualizing performance data | ||
|
||
A fundamental aspect of continuous profiling is the flamegraph, a convenient way to visualize performance data. | ||
These graphs provide a clear, intuitive understanding of resource allocation and bottlenecks within the application. Pyroscope extends this functionality with additional visualization formats like tree graphs and top lists. | ||
|
||
## How is a flamegraph created? | ||
|
||
![code to flamegraph diagram](https://grafana.com/static/img/pyroscope/code-to-flamegraph-animation.gif) | ||
|
||
This diagram shows how code is turned into a flamegraph. In this case Pyroscope would sample the stacktrace of your application to understand how many CPU cycles are being spent in each function. It would then aggregate this data and turn it into a flamegraph. This is a very simplified example but it gives you an idea of how Pyroscope works. | ||
|
||
## What does a flamegraph represent? | ||
|
||
![flamegraph](https://grafana.com/static/img/pyroscope/pyroscope-flamegraph-2023-11-30.png) | ||
|
||
Horizontally, the flamegraph represents 100% of the time that this application was running. | ||
The width of each node represents the amount of time spent in that function. | ||
The wider the node, the more time spent in that function. The narrower the node, the less time spent in that function. | ||
|
||
Vertically, the nodes in the flamegraph represent the heirarchy of which functions were called and how much time was spent in each function. | ||
The top node is the root node and represents the total amount of time spent in the application. | ||
The nodes below it represent the functions that were called and how much time was spent in each function. | ||
The nodes below those represent the functions that were called from those functions and how much time was spent in each function. | ||
This continues until you reach the bottom of the flamegraph. | ||
|
||
This is a CPU profile, but profiles can represent many other types of resource such as memory, network, disk, etc. | ||
To understand more about how to read a flamegraph, what the different colors mean, and what other types of profiles exist and when to use them see our flamegraph documentation or [profile types documentation](/docs/pyroscope/next/analyzing-profiles-in-pyroscope-ui/) |
Oops, something went wrong.