-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
chore(deps): Try LTO to see if it fixes linking issues on old OSes #17342
Conversation
Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
✅ Deploy Preview for vector-project ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for vrl-playground canceled.
|
Datadog ReportBranch report: ✅ |
Regression Detector ResultsRun ID: 7ee92b96-2091-4999-8a39-acd6823a5d8b ExplanationA regression test is an integrated performance test for Because a target's optimization goal performance in each experiment will vary somewhat each time it is run, we can only estimate mean differences in optimization goal relative to the baseline target. We express these differences as a percentage change relative to the baseline target, denoted "Δ mean %". These estimates are made to a precision that balances accuracy and cost control. We represent this precision as a 90.00% confidence interval denoted "Δ mean % CI": there is a 90.00% chance that the true value of "Δ mean %" is in that interval. We decide whether a change in performance is a "regression" -- a change worth investigating further -- if both of the following two criteria are true:
The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values of "Δ mean %" mean that baseline is faster, whereas positive values of "Δ mean %" mean that comparison is faster. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed. Changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%:
Fine details of change detection per experiment.
|
Cargo.toml
Outdated
@@ -35,11 +35,15 @@ path = "src/config/loading/secret_backend_example.rs" | |||
test = false | |||
bench = false | |||
|
|||
[profile.dev] | |||
lto = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this test, setting lto = "thin"
is faster to link.
@zamazan4ik you might find this interesting too :) Turns out we weren't doing LTO on release assets. |
Hah, I was sure it's enabled since Vector has https://github.com/vectordotdev/vector/blob/master/scripts/environment/release-flags.sh ... :) |
Aha, actually you are right :D We just don't use those flags for the performance tests apparently. |
You might want to add the other optimization options from: https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/Cargo.toml#L20-L24 Right now I'm seeing:
|
How does enabling the |
I had
From the perspective of Linux distribution packages - binary size is much more important. These are the numbers for NixOS:
Currently, for each Vector release/package update - the supporting infrastructure (which might not be cheap) has to push out a 238M binary package to every single instance deployed (rather than a much slimmer 86M which does the exact same thing) - and sure, I could just change that at the NixOS package level, but better to get it upstreamed for every other distro out there too. |
Vector releases do enable LTO (per #17342 (comment) this is done by changing the flags in CI). The binaries we distribute are around ~120 MB. Certainly they could be smaller, but, as @zamazan4ik notes, Vector's focus is performance and so the compilation is optimized for that. I can see that Nix is sensitive to the package size though, maybe it'd make sense to use |
I swear the binaries used to be smaller too, around 80 MB. I might bisect down to see if there were specific commits that bumped us up significantly or if it was a slow burn. |
The issue is that no downstream Linux distribution is going to use the prebuilt binaries. I could patch this in, but much easier if this just gets merged. I pushed the same thing to another Rust project last month and it's even landed in the stable NixOS release as of yesterday:
|
…eleases are published with Per #17342 (comment) Linux distros commonly rebuild Vector rather than pulling in prebuilt artifacts. They could set the same profile flags we do (or even flags that are deemed to be better suited) but I do see value in "just" having the `release` profile match how we build and distribute release versions of Vector to serve as the default for anyone else building release builds. The original intent of having CI set different release flags than were in Cargo.toml was to have faster local release builds when analyzing Vector performance. Now that custom profiles exist, which didn't at the time, I added a custom profile, `dev-perf`, to be used for this purpose instead. Ref: #17342 (comment) Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
That's a good point :) I opened #20034. Let me know what you think of that. |
I can't remember which OSes I was targeting with this change. I'm guessing it was CentOS 7, which went EOL earlier this year. |
Seeing if this fixes
nix
compilation as suggested by nix-rust/nix#1972 (comment)Signed-off-by: Jesse Szwedko jesse.szwedko@datadoghq.com