Slow cache retrieval speeds on the self-hosted runners
In my setup the cache retrieval step is the longest step for each action:
It takes around 3-4 minutes to download and extract a 515MB cache file:

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)
FIY: It looks like all runners are reusing Gradle cache (/home/ubuntu/.gradle), so for my setup actions/cache is not required at all (still it would be nice to have the ability to utilize local cache).
Has a local cache been added by now. Build and security test take me 6 mins upload and download take me 50min. This is unnecessary as I want to have my cache on my runner and not somewhere in the stars
+1 @igorwojda please consider reopening this, as the questions proposed are still very valid
The cache should be held in the self-hosted runner instead of github, no need for network downloads and uploads
The cache should be held in the self-hosted runner instead of github, no need for network downloads and uploads
I’m using a mix of self-hosted and GitHub-hosted runners, so I’d still prefer a solution where caches remain stored on GitHub. However, it would be highly beneficial if self-hosted runners could maintain a local copy of any cache archive they have previously downloaded or generated. That way, subsequent runs on the same runner wouldn’t need to repeatedly download the same cache from GitHub.