Continuous Profile-Guided Optimization (PGO) platform based on Grafana Pyroscope #2783
Replies: 3 comments 6 replies
-
hey @zamazan4ik ! Thanks for the very interesting discussion topic and for sharing your thoughts on PGO in your IT ecosystem context. I would say I'm definitely very intrigued by your sugggestion of leveraging Pyroscope for implementing open source ecosystem similar to Google's autofdo. We've previously explored the integration of PGO within the Go context, particularly through our profile-cli tool. This tool allows querying specific applications over user-defined time periods to generate pprof files, which can then be utilized for PGO in Golang. What you're proposing seems to align closely with these capabilities but I guess with a slightly different profile format. Moving forward, here are some potential next steps and considerations for implementing your idea:
Would love to work together to do a POC of this if you're interested! |
Beta Was this translation helpful? Give feedback.
-
Marco Ferror gave a talk at GopherCon about how they automate PGO in their CI pipeline. Unfortunately the videos are not out yet and I can't find an paper that they published. |
Beta Was this translation helpful? Give feedback.
-
@simonswine at FOSDEM 2024 we discussed this topic a bit and you said to ping you here :) What can be our next steps in trying to push forward the PGO profiling infrastructure for native languages in Pyroscope? I suppose some kind of (hopefully) helpful information is already here. If you need some more information - feel free to ask me! At least I will try to find an answer or find the right person with an answer :) |
Beta Was this translation helpful? Give feedback.
-
Hi!
I evaluate multiple approaches to applying Profile-Guided Optimization (PGO) to the IT ecosystem (if you are interested you can check the results here). According to my tests, PGO helps with achieving better performance for many existing applications.
There are two major kinds of PGO: Instrumentation and Sampling (about both of them you can read the Clang compiler documentation). Despite Instrumentation-based PGO is much more well-known in the community (from my experience), it has major drawbacks. One of the biggest drawbacks is the performance overhead during the profiling phase.
To resolve this issue, Google invented Sampling PGO (also sometimes called AutoFDO (https://github.com/google/autofdo)). This approach uses
perf
-based profiling to collect the PGO profiles directly from the production environment, and then use them during the optimization phase. More details about the whole ecosystem around AutoFDO in Google can be found in their paper.Unfortunately, right now there is no open-source ecosystem to support the AutoFDO approach at scale as it's done in Google. But Grafana Pyroscope looks like an important piece in this pipeline (we can say it could replace Google Wide Profiler (GWP) in the AutoFDO setup in Google).
My idea is to think about building the same system as Google has internally but based on Pyroscope. It could be an interesting opportunity for Pyroscope to become a unique solution in the continuous optimization area. As I see in the Pyroscope users activity already there is some interest in PGO from users.
Would be great to hear thoughts about the idea from the Pyroscope devs.
Thank you for your attention.
Beta Was this translation helpful? Give feedback.
All reactions