Caching on self-hosted runners #18549
Replies: 5 comments 11 replies
-
This is super-important for teams running self-hosted runners; especially ephemeral workloads. We run a cluster of self-hosted runners on ECS Fargate, and would prefer a cache that can either be mounted as a volume for the containers or on S3, whichever is flexible in terms of implementation and/or cost. |
Beta Was this translation helpful? Give feedback.
-
How do we raise visibility on this issue? It's a really big miss from a product standpoint IMO. I am definitely seeing what the OP sees in #2 which is the cache is so slow at times that it stalls / times out my jobs. At this point I am disabling caching in order to get consistent (reliable) behavior which is a travesty. [edit] If dangling a carrot helps, I have a feeling the egress costs are quite high for GH to host these caches. Some talented engineer/team is going to save GH a wad of cache by helping us solve this. |
Beta Was this translation helpful? Give feedback.
-
@deeno35 based on the storage pricing model, the storage and egress costs are marked up quite a bit so the lack of local caching is actually part of the product imo. I'm concerned that Github will actually not be motivated to solve this problem for that reason. Is writing a custom action with more flexible caching options possible? |
Beta Was this translation helpful? Give feedback.
-
I'm using https://github.com/everpcpc/actions-cache as a solution to store cache from EC2 runners to S3 and it works fine, although a gateway endpoint is needed in the VPC to ensure there are no egress costs. Works fine for me. |
Beta Was this translation helpful? Give feedback.
-
We encountered an issue with custom cache actions not working when other actions (like |
Beta Was this translation helpful? Give feedback.
-
So two main issues here.
Caching on self-hosted runners makes 0 sense in how it currently works. If I'm self hosting the cache should be on the machine that the runner is on not uploaded/downloaded from Github on every run. This is adding a load of extra bandwidth on both Github's side and our side for no good reason. This is also really unintuitive and it's not mentioned anywhere that I could find. If it is mentioned it's not nearly clear enough. (The only place I can find this is in a single comment from a month or so ago Caching on self-hosted runners github/docs#2271 (comment))
The cache on Github is slow as can be when using a self-hosted runner. Some cases it completely stalls from the slow speed. (This is in a EC2 instance and we have no issues with speed against any other sites, etc. including github itself for clones, etc.)
This is the code we're using in the action. With the workflow set to use
ubuntu-latest
the cache downloads in ~1s or 150MB/s - 200MBs.Beta Was this translation helpful? Give feedback.
All reactions