Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing the cache takes a very long time on Windows #169

Open
Shnatsel opened this issue Aug 28, 2023 · 2 comments
Open

Writing the cache takes a very long time on Windows #169

Shnatsel opened this issue Aug 28, 2023 · 2 comments

Comments

@Shnatsel
Copy link

The post-run phase of rust-cache takes a long time on our CI in https://github.com/rustsec/rustsec, but only on Windows.

Here's a sample log that shows MacOS cache completing in 38 seconds: https://github.com/rustsec/rustsec/actions/runs/6002426049/job/16278755180?pr=969

And here's the same job on Windows-MSVC, with the post-run phase taking over 5 minutes: https://github.com/rustsec/rustsec/actions/runs/6002426049/job/16278755358?pr=969

This is something that we have consistently observed, not a one-off.

The job definition can be found here: https://github.com/rustsec/rustsec/blob/b6def7c9fa30d7da2b2f569a9cded0f041d68068/.github/workflows/cargo-audit.yml#L36-L54

@Shnatsel
Copy link
Author

After talking to a few people about it, it seems that Github Actions Windows runners simply have very slow networking, so this is not something that can be easily fixed in this action.

It might be possible to improve slightly by increasing the compression ratio on Windows, for example.

@jqnatividad
Copy link

jqnatividad commented Apr 3, 2024

Writing the cache on Windows is just painfully slow compared to macOS and Linux action runners.
You would think that since GH is owned by Microsoft that they'd optimize the Windows runners a bit more.
Just wanted to add that any improvement on its performance would be much appreciated!

In my workflows though, it takes a very long time to compress the cache with a Zstd compression level of 10, and the network copy time is negligible by comparison.

https://github.com/jqnatividad/qsv/actions/runs/8535984799/job/23383567613

Maybe the compression level is too high?

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

No branches or pull requests

2 participants