akasa icon indicating copy to clipboard operation
akasa copied to clipboard

Evaluate Profile-Guided Optimization (PGO) and LLVM BOLT

Open zamazan4ik opened this issue 2 years ago • 1 comments

Hi!

Recently I did many Profile-Guided Optimization (PGO) benchmarks on multiple projects (including many network-related projects like Envoy, HAProxy, etc.) - the results are available here. I think it could interesting to try to test PGO for optimizing the CPU part of Akasa.

I can suggest the following things to do:

  • Evaluate PGO's applicability to Akasa.
  • If PGO helps to achieve better performance - add a note to Akasa's documentation about that. In this case, users and maintainers will be aware of another optimization opportunity for Akasa.
  • Provide PGO integration into the build scripts. It can help users and maintainers easily apply PGO for their own workloads.

Here are some examples of how PGO is already integrated into other projects' build scripts:

After PGO, I can suggest evaluating LLVM BOLT as an additional optimization step after PGO.

For the Rust projects, I recommend starting with cargo-pgo.

I understand that the project is in the earliest stages of its lifecycle. So just think about the issue as a possible idea for improvements.

zamazan4ik avatar Sep 28 '23 12:09 zamazan4ik

Sounds like a very awesome technology to optimize the program.

I understand that the project is in the earliest stages of its lifecycle.

Yes, currently adding more features are more higher priority tasks, but I'll definitely try this once I start doing optimization.

Thanks for your introduction to PGO :)

TheWaWaR avatar Sep 28 '23 12:09 TheWaWaR