github.com/grafana/pyroscope@v1.18.0/docs/sources/shared/intro/continuous-profiling.md (about) 1 --- 2 headless: true 3 description: Shared file for intro to continuous profiling. 4 --- 5 6 [//]: # 'When to use continuous profiling.' 7 [//]: # 'This shared file is included in these locations:' 8 [//]: # '/pyroscope/docs/sources/introduction/continuous-profiling.md' 9 [//]: # '/website/content/grafana-cloud/monitor-applications/profiles/introduction/continuous-profiling.md' 10 [//]: # 11 [//]: # 'If you make changes to this file, verify that the meaning and content are not changed in any place where the file is included.' 12 [//]: # 'Any links should be fully qualified and not relative: /docs/grafana/ instead of ../grafana/.' 13 14 <!-- When to use continuous profiling --> 15 16 Continuous profiling is a systematic method of collecting and analyzing performance data from production systems. 17 18 Traditionally, profiling is used to debug applications on an as-needed basis. 19 For example, you can run a benchmark tool locally and get a `pprof` file in Go or connect to a misbehaving prod instance and pull a flame graph from a `JFR` file in Java. 20 This method is good for debugging, but not robust enough for production. 21 22  23 24 Refer to [Flame graphs](ref:flame-graphs) to learn more. 25 26 Continuous profiling is a modern approach which is safer and more scalable for production environments. 27 It uses low-overhead sampling to collect profiles from production systems and stores the profiles in a database for later analysis. 28 Using continuous profiling gives you a more holistic view of your application and how it behaves in production. 29 30 Grafana offers Grafana Pyroscope and Grafana Cloud Profiles (powered by Pyroscope) to collect and store your profiling data. 31 You can use Grafana Profiles Drilldown to inspect profile data and investigate issues. 32 33 ## Benefits 34 35 Why prioritize continuous profiling? 36 37 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. 38 2. **Complements other observability tools:** Continuous profiling fills critical gaps left by metrics, logs, and tracing, creating a more comprehensive observability strategy. 39 3. **Proactive performance optimization:** Regular profiling enables teams to proactively identify and resolve performance bottlenecks, leading to more efficient and reliable applications. 40  41 42 ## Use cases 43 44 Adopting continuous profiling with tools like Grafana Pyroscope and Profiles Drilldown can lead to significant business advantages: 45 46 1. **Reduced operational costs:** Optimization of resource usage can significantly cut down cloud and infrastructure expenses 47 2. **Reduced latency:** Identifying and addressing performance bottlenecks leads to faster and more efficient applications 48 3. **Enhanced incident management:** Faster problem identification and resolution, reducing Mean Time to Resolution (MTTR) and improving end-user experience 49 50  51 52 ### Reduced operational costs 53 54 By providing in-depth insights into application performance, profiling empowers teams to identify and eliminate inefficiencies, leading to significant savings in areas like observability, incident management, messaging/queuing, deployment tools, and infrastructure. 55 56 <!-- vale Grafana.Spelling = NO --> 57 By using sampling profilers, Pyroscope and Cloud Profiles can collect data with minimal overhead (~2-5% depending on a few factors). 58 The [custom storage engine](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/reference-pyroscope-architecture/about-grafana-pyroscope-architecture/) compresses and stores the data efficiently. 59 Some advantages of this are: 60 61 - Low CPU overhead thanks to sampling profiler technology 62 <!-- vale Grafana.Spelling = YES --> 63 - Control over profiling data granularity (10s to multiple years) 64 - Efficient compression, low disk space requirements and cost 65 66 ### Reduced latency 67 68 Profiles play a pivotal role in reducing application latency by identifying performance bottlenecks at the code level. 69 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. 70 71 ### Enhanced incident management 72 73 Pyroscope and Profiles Drilldown streamline incident management by offering immediate, actionable insights into application performance issues. 74 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.