You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During this run I observe the sccache process consuming multiple cores worth of CPU time (~600+%) at points of the build process. The total time here is 158.7s (2m 38.7s)
it would seem that after the first build we’re seeing perfect cache utilization (cache hits == cache misses.) This suggests the 2nd build should get fetched from the disk, pretty much, but that either isn’t happening, is very slow for some reason or sccache is not able to handle the 96 build processes of parallelism.
Here are the build timings from cargo (NB: to see graphs you need to slide the "min unit time slider to non-zero and reload the page):
This is the expected behavior.
Sccache caches compilations. Clippy is static analysis. If you try sccache with clippy, add sccache overhead but still have to run the full analysis.
Maybe we should break the build to make this explicit.
Well, hm, the reason I started looking into this at all was because my regular builds felt slower too. I can try to make this issue report about that instead, it just felt that clippy was a much better demo of the problem. Thanks for letting me know that isn't the case.
EDIT: though that will have to wait for a little bit.
Thank you for the patience! I tried it out with cargo build and was able to get build times in the order of 1 minute after a populated cache (as opposed to 1m 47s for a regular build.) It still feels like a lot of time is being spent somewhere in sccache, but at least this is not slower and I don’t have any other actionable insights so I’ll close this.
On my system I'm seemingly observing sccache having a very hard time being quick.
I’m using https://github.com/near/nearcore/pulls as the test case here on a machine with 48 cores and 96 threads.
To establish a baseline, from the root of repository, I run:
which reports a total time of
105.7s (1m 45.7s)
.Then running an sccache-enabled check for the first time (to build up the cache):
During this run I observe the
sccache
process consuming multiple cores worth of CPU time (~600+%) at points of the build process. The total time here is158.7s (2m 38.7s)
Second sccache-enabled run:
Unfortunately is still slower than the non-cache build, coming in at
122.4s (2m 2.4s)
.Looking at the sccache stats:
it would seem that after the first build we’re seeing perfect cache utilization (cache hits == cache misses.) This suggests the 2nd build should get fetched from the disk, pretty much, but that either isn’t happening, is very slow for some reason or sccache is not able to handle the 96 build processes of parallelism.
Here are the build timings from cargo (NB: to see graphs you need to slide the "min unit time slider to non-zero and reload the page):
sccache version: v0.7.4, installed via
cargo install
just now.rustc: 1.75.0
I would appreciate some suggestions where to look to figure out what the problem here really is.
The text was updated successfully, but these errors were encountered: