Skip to content

Conversation

lqd
Copy link
Member

@lqd lqd commented Dec 2, 2024

Distribute aarch64-apple-darwin artifacts built with rust.codegen-units=1, like we already do on Linux/Windows/macOS Intel.

  1. Performance results (only wall-time on mac as usual)
  • I only did some ripgrep check builds (the revision from rustc-perf), because we had noticeable wins in wall-time there back then on linux. It's a ~2-4% (mostly 3%) improvement on local builds.
Benchmark 1: cargo +caa81728c37f5ccfa9a0979574b9272a67f8a286 check -q
  Time (mean ± σ):      5.800 s ±  0.087 s    [User: 16.048 s, System: 2.294 s]
  Range (min … max):    5.725 s …  6.028 s    10 runs
 
Benchmark 2: cargo +41f40c97bbff6c8642f5510d0be283551b095b70 check -q
  Time (mean ± σ):      5.551 s ±  0.037 s    [User: 15.451 s, System: 2.252 s]
  Range (min … max):    5.477 s …  5.602 s    10 runs
 
Summary
  'cargo +41f40c97bbff6c8642f5510d0be283551b095b70 check -q' ran
    1.04 ± 0.02 times faster than 'cargo +caa81728c37f5ccfa9a0979574b9272a67f8a286 check -q'
Benchmark 1: CARGO_INCREMENTAL=0 cargo +caa81728c37f5ccfa9a0979574b9272a67f8a286 check -q
  Time (mean ± σ):      5.743 s ±  0.030 s    [User: 16.005 s, System: 2.249 s]
  Range (min … max):    5.720 s …  5.792 s    5 runs
 
Benchmark 2: CARGO_INCREMENTAL=0 cargo +41f40c97bbff6c8642f5510d0be283551b095b70 check -q
  Time (mean ± σ):      5.469 s ±  0.055 s    [User: 15.244 s, System: 2.110 s]
  Range (min … max):    5.404 s …  5.524 s    5 runs
 
Summary
  'CARGO_INCREMENTAL=0 cargo +41f40c97bbff6c8642f5510d0be283551b095b70 check -q' ran
    1.05 ± 0.01 times faster than 'CARGO_INCREMENTAL=0 cargo +caa81728c37f5ccfa9a0979574b9272a67f8a286 check -q'
Benchmark 1: CARGO_INCREMENTAL=0 cargo +caa81728c37f5ccfa9a0979574b9272a67f8a286 check -q -j1
  Time (mean ± σ):     15.092 s ±  0.049 s    [User: 11.969 s, System: 1.665 s]
  Range (min … max):   15.052 s … 15.165 s    5 runs
 
Benchmark 2: CARGO_INCREMENTAL=0 cargo +41f40c97bbff6c8642f5510d0be283551b095b70 check -q -j1
  Time (mean ± σ):     14.623 s ±  0.035 s    [User: 11.520 s, System: 1.619 s]
  Range (min … max):   14.593 s … 14.682 s    5 runs
 
Summary
  'CARGO_INCREMENTAL=0 cargo +41f40c97bbff6c8642f5510d0be283551b095b70 check -q -j1' ran
    1.03 ± 0.00 times faster than 'CARGO_INCREMENTAL=0 cargo +caa81728c37f5ccfa9a0979574b9272a67f8a286 check -q -j1'
  1. Effects on code size on aarch64-apple-darwin: it's a 13.24% reduction on librustc_driver.dylib
  • before: 173452888 (57.3 MB compressed).
  • after: 150471368 (55.2 MB compressed, -3.7% here).
  1. Effects on CI

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Dec 2, 2024
@lqd
Copy link
Member Author

lqd commented Dec 2, 2024

@bors try

@bors
Copy link
Collaborator

bors commented Dec 2, 2024

⌛ Trying commit 70e0d58 with merge 41f40c9...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 2, 2024
build `rustc` with 1 CGU on `aarch64-apple-darwin`

Distribute `aarch64-apple-darwin` artifacts built with `rust.codegen-units=1`, like we already do on Linux/Windows/macOS Intel.

1. Performance results (only wall-time on mac as usual)
- I only did some `ripgrep` check builds (the revision from rustc-perf), because we had noticeable wins in wall-time there back then on linux. It's a ~2-4% (mostly 3%) improvement on local builds, and will re-check with CI artifacts once they're available.

2. Effects on code size on `aarch64-apple-darwin`:
- before: TODO, 165MB or so
- after: TODO, 142MB or so

3. Effects on CI
- TODO

r? `@ghost`

try-job: dist-aarch64-apple
@Kobzol
Copy link
Member

Kobzol commented Dec 2, 2024

It's actually a good point that 1 CGU might save us a lot of bandwidth costs, even if it's not such a big compile-time win 😆 Although we need to be wary of the CI build cost too, of course.

@lqd
Copy link
Member Author

lqd commented Dec 2, 2024

Yes that's why I'm preparing all these stats. Though I'd take a """free""" 3% win any day ^^

@bors
Copy link
Collaborator

bors commented Dec 2, 2024

☀️ Try build successful - checks-actions
Build commit: 41f40c9 (41f40c97bbff6c8642f5510d0be283551b095b70)

@lqd
Copy link
Member Author

lqd commented Dec 2, 2024

@bors try

@bors
Copy link
Collaborator

bors commented Dec 2, 2024

⌛ Trying commit 70e0d58 with merge 8fabeef...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 2, 2024
build `rustc` with 1 CGU on `aarch64-apple-darwin`

Distribute `aarch64-apple-darwin` artifacts built with `rust.codegen-units=1`, like we already do on Linux/Windows/macOS Intel.

1. Performance results (only wall-time on mac as usual)
- I only did some `ripgrep` check builds (the revision from rustc-perf), because we had noticeable wins in wall-time there back then on linux. It's a ~2-4% (mostly 3%) improvement on local builds, and will re-check with CI artifacts once they're available.

2. Effects on code size on `aarch64-apple-darwin`:
- before: TODO, 165MB or so
- after: TODO, 142MB or so

3. Effects on CI
- TODO

r? `@ghost`

try-job: dist-aarch64-apple
@bors
Copy link
Collaborator

bors commented Dec 2, 2024

☀️ Try build successful - checks-actions
Build commit: 8fabeef (8fabeefc526b981a022161c995e21b43a3de748c)

@lqd lqd marked this pull request as ready for review December 2, 2024 16:06
@lqd
Copy link
Member Author

lqd commented Dec 2, 2024

Alright, this looks good enough for review, r? infra

@Kobzol
Copy link
Member

Kobzol commented Dec 2, 2024

Before the duration was usually around 1h 20m, I think that slight increase is fine, especially since this is running on a free runner. Nice results!

@bors r+ rollup=never

(setting rollup=never in case this caused some compilation regressions down the line)

@bors
Copy link
Collaborator

bors commented Dec 2, 2024

📌 Commit 70e0d58 has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 2, 2024
@bors
Copy link
Collaborator

bors commented Dec 2, 2024

⌛ Testing commit 70e0d58 with merge 42b4b9c...

@bors
Copy link
Collaborator

bors commented Dec 3, 2024

☀️ Test successful - checks-actions
Approved by: Kobzol
Pushing 42b4b9c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 3, 2024
@bors bors merged commit 42b4b9c into rust-lang:master Dec 3, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 3, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (42b4b9c): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.0%, secondary -3.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.0% [-3.4%, -0.7%] 2
Improvements ✅
(secondary)
-3.4% [-3.4%, -3.4%] 1
All ❌✅ (primary) -2.0% [-3.4%, -0.7%] 2

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 767.322s -> 768.021s (0.09%)
Artifact size: 332.21 MiB -> 332.25 MiB (0.01%)

@lqd lqd deleted the osx-aarch64-1cgu branch December 3, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants