Skip to content

[C++][CI] Investigate sccache performance #50722

Description

@pitrou

Describe the enhancement requested

On Crossbow builds, we're using sccache together with a S3 bucket (I believe?) to save compilation times.

It seems that sccache is quite able to reuse its cached results, sparing some compilation cycles. However, it also seems to spend a lot of time waiting for I/O, for example here:

real	12m19.543s
user	2m0.199s
sys	0m26.643s

=> in that example, compilation took only 2 minutes of CPU time but also spent almost 10 idle minutes waiting for network results.

Compare with a random ccache-based build on the mailine CI:

real	1m34.897s
user	3m29.112s
sys	0m54.799s

The point here is not necessarily to compare absolute values, but to show that we would expect total real time to be smaller than user time, since user time accounts for multiple CPUs.

More generally, it seems that perhaps we should:

  1. improve sccache configuration for faster turnarounds (is that possible?)
  2. enable unity builds to reduce roundtrips (would that save enough time?)
  3. migrate to ccache + apache/infrastructure-actions/stash as we did on mainline CI

Component(s)

Continuous Integration, C++

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions