Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous Profile-Guided Optimization (PGO) platform based on Elastic Universal Profiling #105802

Closed
zamazan4ik opened this issue Feb 25, 2024 · 4 comments
Labels
>enhancement needs:triage Requires assignment of a team area label

Comments

@zamazan4ik
Copy link
Contributor

Description

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 the Elastic Universal Profiling platform 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 Elastic Universal Profiling. It could be an interesting opportunity for Elastic to become a unique solution in the continuous optimization area.

It would be great to hear thoughts about the idea from the Elastic devs.

Thank you for your attention.

P.S. Similar discussion in the Grafana Pyroscope project: grafana/pyroscope#2783

@zamazan4ik zamazan4ik added >enhancement needs:triage Requires assignment of a team area label labels Feb 25, 2024
@gbanasiak
Copy link
Contributor

@zamazan4ik Many thanks for this valuable suggestion. The best place to have this discussion would be https://discuss.elastic.co/c/observability/profiling. Could you start a new topic there?

We prefer to use issues in this repository to track bugs and feature requests specific to Elasticsearch search engine. I hope you don't mind if I close this issue.

@zamazan4ik
Copy link
Contributor Author

Oh, sure. Didn't know about that platform. I will create a discussion there - thanks!

@gbanasiak
Copy link
Contributor

Great, please post a link here for cross reference. Thank you!

@zamazan4ik
Copy link
Contributor Author

Here we go: https://discuss.elastic.co/t/continuous-profile-guided-optimization-pgo-platform-based-on-elastic-universal-profiling/354605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement needs:triage Requires assignment of a team area label
Projects
None yet
Development

No branches or pull requests

2 participants