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

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT #5661

Open
zamazan4ik opened this issue Jul 29, 2023 · 3 comments
Open

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT #5661

zamazan4ik opened this issue Jul 29, 2023 · 3 comments
Labels
type/enhancement Type: make the code neat or more efficient

Comments

@zamazan4ik
Copy link

Introduction
Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are here. Since PGO helps with performance for a lot of databases, I think applying PGO to Nebula would be a good idea.

Contents
We need to perform PGO benchmarks on Nebula. And if it shows improvements - add a note about possible improvements Nebula's performance with PGO. Providing an easier way (e.g. a build option) to build scripts with PGO can be useful for the maintainers and end-users too.

Related work
As an additional option, after PGO you can try to apply LLVM BOLT to optimize Nebula even further.

@zamazan4ik zamazan4ik added the type/enhancement Type: make the code neat or more efficient label Jul 29, 2023
@wey-gu
Copy link
Contributor

wey-gu commented Jul 31, 2023

Introduction

Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are here. Since PGO helps with performance for a lot of databases, I think applying PGO to Nebula would be a good idea.

Contents

We need to perform PGO benchmarks on Nebula. And if it shows improvements - add a note about possible improvements Nebula's performance with PGO. Providing an easier way (e.g. a build option) to build scripts with PGO can be useful for the maintainers and end-users too.

Related work

As an additional option, after PGO you can try to apply LLVM BOLT to optimize Nebula even further.

Dear @zamazan4ik

Welcome to the NebulaGraph community! Thanks a lot for considering boosting NebulaGraph with PGO!

@lipzhu had contributed autoFDO via #4636 and https://docs.nebula-graph.io/3.5.0/8.service-tuning/enable_autofdo_for_nebulagraph/

Could you check if this could be reused/ referred?

Let us know for anything we could collaborate/help!

Thanks!

@zamazan4ik
Copy link
Author

Could you check if this could be reused/ referred?

Thanks for the link! Actually, AutoFDO is one of the approaches for doing PGO (AutoFDO is a tool, but the approach with AutoFDO is called Sampling PGO).

I can suggest trying to evaluate another option - Instrumentation PGO. For Clang it's described here. In general, Instrumentation PGO achieves better performance results than Sampling PGO.

As an additional step, I can suggest you try to integrate LLVM BOLT into the build pipeline. LLVM BOLT is able to optimize even after Sampling/Instrumentation PGO.

@zamazan4ik zamazan4ik changed the title Evaluate Profile-Guided Optimization (PGO) Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT Jul 31, 2023
@wey-gu
Copy link
Contributor

wey-gu commented Aug 25, 2023

Sorry for the late response, @dutor Instrumentation PGO is quite promising! Shall we do some evaluation manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

2 participants