-
Notifications
You must be signed in to change notification settings - Fork 612
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
Profile-Guided Optimization (PGO) evaluation #1918
Comments
Hi @zamazan4ik could you propose us a small text for the documentation about "Add a note to the Hurl documentation about building with PGO" |
Sure! Firstly, I want to share with you existing PGO-oriented documentation in other projects:
I hope you can find something useful in the examples above. About suggesting a small text about PGO, I suggest you answer the following questions in this text:
Where to put this instruction? I guess somewhere in "Building from sources" documentation. So I think the text could look like this (as a reference I used Vector documentation about PGO): "Profile-Guided Optimization (PGO) is a compiler optimization technique where a program is optimized based on the runtime profile. According to the tests, we see improvements of up to 20% faster request executions in the benchmark. The performance benefits depend on your typical workload - you can get better or worse results. More information about PGO in Hurl can be found in the corresponding GitHub issue. How to build Hurl with PGO? There are two major kinds of PGO: Instrumentation and Sampling (also known as AutoFDO). In this guide, is described the Instrumentation PGO with Hurl. We use cargo-pgo for building Hurl with PGO.
A more detailed guide on how to apply PGO is in the Rust documentation." I think having something like this in the documentation is fine. |
Thanks a lot, I'll put all this in the repo under "contrib", and link it in the documentation! |
Hi!
I did a lot of Profile-Guided Optimization (PGO) benchmarks recently on different kinds of software - all currently available results are located at https://github.com/zamazan4ik/awesome-pgo . According to the tests, PGO usually helps with achieving better performance. That's why testing PGO would be a good idea for Hurl. I did some benchmarks on my local machine and want to share my results.
Test environment
hurl
from themaster
branch (commit7ed25baac9934a1a86f61a8f4bedcdc76dbaa2a2
)Test workload
As a test scenario, I used benches from the repo. The only differences are increased request count (10k) and using an Axum-based HTTP server instead of Flask (because on my machine this Flask-based server is overloaded with these benchmarks and stuck in a few moments).
All runs are performed on the same hardware, operating system, and the same background workload (as much as I can guarantee this on macOS). All PGO optimizations are done with cargo-pgo. The profile information was collected from the benchmarks as well.
Results
Here are the results in Hyperfine format, where the PGO-optimized binary is compared to the Release binary (PGO-optimized is faster according to the results below):
Some conclusions
hurl
performance at least in the provided by the project's benchmarks. I think the same results can be estimated for other cases.Further steps
I can suggest to do the following things:
The text was updated successfully, but these errors were encountered: