perf(release): switch the release profile from fat to thin LTO - #16
Merged
Conversation
Fat LTO with one codegen unit made each binary's link a 13.6 GB whole-program pass over Arrow, DataFusion and Ballista (peak RSS of the largest rustc, measured 2026-09-07 on Apple Silicon). Cargo links the three binaries in parallel, so the 16 GB Linux release runners were torn down with exit 143 on v0.1.0 and v0.1.2, and the 7 GB macOS runners swapped for 4h11m and 4h37m per target on v0.1.0; their v0.1.2 jobs were cancelled after 2h31m. Measured on the same machine, cold builds of the three binaries: fat, 1 codegen unit: 11m57s, peak 13.6 GB, oxide 68 MB thin, 1 codegen unit: 5m22s, peak 7.4 GB, oxide 74 MB thin, 16 codegen units: 7m22s, peak 2.6 GB, oxide 120 MB A 10M-row GROUP BY aggregate ran in about 40 ms under all three; the workload is too small to separate them, and no regression was visible. Thin LTO with one codegen unit keeps 91% of fat's binary size and halves the link, so that is the profile. Sixteen units would fit comfortably everywhere but cost 75% in size; it stays the documented fallback if the macOS runners still swap. binaries.yml gains a 90-minute timeout so a swapping link fails loudly, and its comment now records the thin-profile peak. The one-link-at-a-time loop stays: three 7.4 GB links still exceed 16 GB. SPEC.md and ADR-0008 quote the profile and are updated. Not done: no runtime benchmark larger than the 10M-row aggregate; the first release build under this profile is the measurement for the runners. Signed-off-by: Vyncint Ng <vyncint@icloud.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today
Fat LTO with one codegen unit makes each binary's link a 13.6 GB whole-program pass. Cargo links the three binaries in parallel, so the 16 GB Linux release runners died with exit 143 on v0.1.0 and v0.1.2 (fixed by linking serially in #15), and the 7 GB macOS runners swapped for 4h11m and 4h37m per target on v0.1.0. Their v0.1.2 jobs were cancelled after 2h31m. With serial links a single fat link still needs 13.6 GB, so macOS would keep swapping.
Measured
Cold builds of the three binaries on Apple Silicon (12 cores, 24 GB),
/usr/bin/time -lpeak RSS of the largest process:oxideoxide-scheduleroxide-workerA 10M-row
GROUP BYaggregate (SUM,AVG,COUNT) ran in about 40 ms under all three, four alternating runs each. That workload is too small to separate them; it shows no regression, not a measured equivalence.Change
[profile.release]lto = "thin",codegen-units = 1unchanged, with the numbers in the comment.binaries.yml:timeout-minutes: 90, comment updated. The one-link-at-a-time loop stays, since three 7.4 GB links still exceed 16 GB.docs/SPEC.mdand ADR-0008 quote the profile; updated.[Unreleased]; ships as v0.1.3.Not done