Skip to content

Cache restore slow compared to Semaphore CI #139

Closed

Description

@davetapley

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?

Activity

  1. dhadka commented on Jan 6, 2020

    @dhadka
    Contributor

    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.

  2. dhadka commented on Jan 6, 2020

    @dhadka
    Contributor

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

  3. smorimoto commented on Feb 16, 2020

    @smorimoto
    Contributor

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

  4. smeijer commented on Feb 28, 2020

    @smeijer

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

    image

  5. smorimoto commented on Feb 28, 2020

    @smorimoto
    Contributor

    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.

  6. smorimoto commented on Feb 28, 2020

    @smorimoto
    Contributor

    See this PR: #202

  7. smorimoto commented on Feb 28, 2020

    @smorimoto
    Contributor

    Note that this PR will take some time to merge.

  8. joshmgross commented on May 29, 2020

    @joshmgross
    Contributor

    👋 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.

  9. mbbernstein commented on Jun 26, 2020

    @mbbernstein

    Hi,

    I've the same issue here:
    image

    Thanks,
    Michael

  10. smorimoto commented on Jun 26, 2020

    @smorimoto
    Contributor

    Could you try to use the v2?

  11. mogusbi commented on Jul 6, 2020

    @mogusbi

    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

  12. joshmgross commented on Jul 6, 2020

    @joshmgross
    Contributor

    👋 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions