actions / actions/cache

Slow cache retrieval speeds on the self-hosted runners

Open
#1,143 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

In my setup the cache retrieval step is the longest step for each action:

image

It takes around 3-4 minutes to download and extract a 515MB cache file:

image

Host OS
Ubuntu 22

Host Internet connection speed:
This file wget http://speedtest.novoserve.com/files/10GB.bin download speed is 40-55MB/s

Host CPU:
Intel(R) Xeon(R) Silver 4310 CPU @ 2.10GHz (12 cores)

Host I/O
hdparm -Tt /dev/sda

  • Timing cached reads: 9070 MB/s
  • Timing buffered disk reads: 1600MB/s

d if=/dev/zero of=/tmp/test1.img bs=1G count=1 oflag=dsync

  • Write: 937 MB/s

Config

      - uses: actions/cache@v3
        with:
          path: ~/.gradle
          key: gradle-${{ hashFiles('gradle-checksums.txt') }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
          restore-keys: |
            gradle-${{ hashFiles('gradle-checksums.txt') }}-

Questions

  • Is there any way to speed up the network cache retrieval?
  • Is there a way to configure a local disk cache for the self-hosted runners? (ideally shared between runners)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names the actions/cache retrieval and extraction step but no source file or test. Begin by tracing that entry point and reproducing the 515MB self-hosted-runner case; done would require improving retrieval or providing a shared local disk cache, but the issue does not define acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.