Cache: Cache restore slow compared to Semaphore CI

Created on 6 Jan 2020  路  12Comments  路  Source: actions/cache

Migrated from here.

Semaphore CI have a cache similar to actions/cache@v1 but theirs only takes six seconds to restore our 760MB node_modules Semaphore CI, compared to twenty eight seconds on GitHub Actions.

This was on Semaphore's lowest machine type which is comparable to the specifications of the GitHub-hosted runners.

This behavior was observed on multiple builds across several days.


I don't have a repro because this was observed on a private repo, but it's easy enough to replicate. I'll create one if it's deemed necessary?

All 12 comments

Hi @dukedave, are your caches actually being created? There is currently a 400 MB limit on the cache size (we will be increasing this limit very soon). I suspect the restore action is failing as a result and you're having to fetch the dependencies from their source. We also released a perf improvement in mid December that should also help cut download times.

The cache limit increase is now released. Please try again and let us know if you're still seeing slow restore times.

I suspect this is a problem with the compression algorithm used.

This is also my experience. 35 sec for ~ 161 mb.

image

We're already working on making it faster, and in my environment it's about three times faster. The next major version will definitely improve.

Note that this PR will take some time to merge.

馃憢 Cache Version 2 has multiple performance improvements, including using zstdfor compression instead of gzip. See https://github.com/actions/cache#whats-new for more details.

I don't think there's anything that's specifically actionable here, if you have any other performance suggestions please open an issue.

Hi,

I've the same issue here:
image

Thanks,
Michael

Could you try to use the v2?

I'm also seeing the problem of the cache restores being very slow. It's ranging anywhere between a few seconds to 12 minutes as well as it just giving up after a period of time

When it goes bad:
image

image

When it goes well:
image

Workflow in question can be found here: https://github.com/motech-development/platform/blob/master/.github/workflows/checks.yml

Actions here: https://github.com/motech-development/platform/actions

馃憢 Hey all, this specific issue has already been resolved. If you are experiencing slow cache restores, please file a new issue with details on your specific use case and expected behavior.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wrightak picture wrightak  路  4Comments

FacetGraph picture FacetGraph  路  3Comments

dhadka picture dhadka  路  5Comments

KhaledSakr picture KhaledSakr  路  3Comments

sergeyzwezdin picture sergeyzwezdin  路  5Comments