Skip to content

Re-enable sccache for the mac-arm64 workflow#43628

Merged
TimvdLippe merged 1 commit intoservo:mainfrom
jschwe:sccache_macos_arm64
Mar 25, 2026
Merged

Re-enable sccache for the mac-arm64 workflow#43628
TimvdLippe merged 1 commit intoservo:mainfrom
jschwe:sccache_macos_arm64

Conversation

@jschwe
Copy link
Copy Markdown
Member

@jschwe jschwe commented Mar 24, 2026

This partially reverts 017b12a. The intermittent issues should be resolved now.

./mach build --release results in ~3GiB of sccache size locally. Since we build multiple configurations (with crown, tests, profiles) we will easily hit the 10GiB cache limit even with just one architecture. Hence, it doesn't make sense to add sccache to more workflows, at least not before we decide to buy more cache or not.
This should hopefully make the macos-arm64 workflows faster. Locally the speed-up on clean builds is significant.

Testing: mach try (no existing cache), mach try #2 - i.e. 34 minutes vs. 19 minutes total runtime, and 30 m vs 15 m build time (with ideal conditions for the caching)

This partially reverts 017b12a.
The intermittent issues should be resolved now.
./mach build --release results in ~3GiB of sccache size locally.
Since we build multiple configurations (with crown, tests, profiles)
we will easily hit the 10GiB cache limit even with just one
architecture. Hence it doesn't make sense to add sccache to more
workflows, at least not before we decide to buy more cache or not.

Signed-off-by: Jonathan Schwender <[email protected]>
Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a shot.

@jschwe
Copy link
Copy Markdown
Member Author

jschwe commented Mar 24, 2026

Note, that github now allows you to buy more cache, priced at 0.07$ / GB-month. So getting another 50-100GB to avoid cache trashing (if this works out) would be relatively cheap.

@jschwe
Copy link
Copy Markdown
Member Author

jschwe commented Mar 24, 2026

We would probably also want a read-only mode, to prevent writing of cache entries from non-default branches (to limit cache trashing of the default branch). It seems sccache already has a feature like that for some storage backends, but not for the gha cache backend. One way to work-around that might be to just use the local backend, and use actions-cache to cache that. Not the most efficient, but maybe worth testing in a fork.

@jschwe jschwe marked this pull request as ready for review March 24, 2026 19:59
@jschwe jschwe requested a review from sagudev as a code owner March 24, 2026 19:59
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 24, 2026
@jschwe jschwe enabled auto-merge March 24, 2026 20:00
@jschwe jschwe added this pull request to the merge queue Mar 24, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 24, 2026
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Mar 24, 2026
@yezhizhen yezhizhen removed this pull request from the merge queue due to a manual request Mar 25, 2026
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 25, 2026
@TimvdLippe TimvdLippe added this pull request to the merge queue Mar 25, 2026
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 25, 2026
@yezhizhen
Copy link
Copy Markdown
Member

Maybe prioritize this one :D

@yezhizhen
Copy link
Copy Markdown
Member

yezhizhen commented Mar 25, 2026

Merged via the queue into servo:main with commit dfd2aee Mar 25, 2026
40 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 25, 2026
@jschwe
Copy link
Copy Markdown
Member Author

jschwe commented Mar 25, 2026

I don't see clear improvement for release build time:

20m22s before:
https://github.com/servo/servo/actions/runs/23509647511/job/68426954857

25m26s now:
https://github.com/servo/servo/actions/runs/23529145786/job/68488910324

That's interesting. In my fork (see PR description) the before job was 30minutes, so if you saw a 20 minute one before, then maybe we have a big fluctuation in job build time anyway, making comparisons harder...

I'm on mobile right now so I can't see the cache usage, but if it's started thrashing excessively than that would also be problematic.

@jschwe jschwe deleted the sccache_macos_arm64 branch March 25, 2026 14:55
@jschwe
Copy link
Copy Markdown
Member Author

jschwe commented Mar 25, 2026

https://github.com/servo/servo/actions/runs/23529145786/job/68488910324

@yezhizhen The first job after merging this PR operated on a cold cache (all cache misses), since the main cache is separate from all branch caches. I did a quick random check of 3 jobs and subsequent CI jobs seem to be faster than before (although it's also not too much).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants