You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using concourse 3.8 with the random container placement strategy. The random placement is necessary because we've had too much trouble with "worker gravity" overloading individual workers in our 6-node cluster. Obviously, the random worker placement resulted in decreased hit-rates for task caches.
A Modest Proposal
Task caches are currently local to a worker. I propose that concourse, after a successful build, asynchronously tries to transfer the cache volume using baggageclaim to a central "cache store".
When executing a task and workers fail to find a cache volume locally, they can try to pull one from the central "cache store". Since it's just caches, this behavior can be "bolted on". It's not important that workers retrieve the most recent version of a cache volume from the "cache store" under all circumstances (no locking etc. required), but more important that they receive any version at all.
Reacted by Diogo Lemos, Julien Syx, Nguyen Duy Tho, Andrew Merrell, Kristian Dalmo Olsen, Radoslav Kirilov, rdark, Bobby Chan, Simon Johansson, Holger Protzek and 5 more
Since the work on spaces has just started #1707, may I also add another scenario: sharing cache volumes between different "variants" of a job or task. We currently repeat many jobs 3 times in our pipeline to serve in build pipelines of different git branches (feature/*, develop, master). This causes us to have a lot more caches than we would need conceptually.
We use caches primarily to cache gradle and yarn's global package caches, and those could be easily shared between different "incarnations" of a job/task in our pipeline.
I'm referencing the spaces epic here because this kind of sharing may become a lot easier to implement with spaces.
Reacted by Wyatt Smith and Alberto Navarrete Martín
We have a lot of pipelines(mostly Java/Scala/Kotlin, so often apps needs to download the universe) and therefore a lot of workers, which will at some point or another get recreated, sometimes every 24h, thus blowing away the cache.
What we currently do is mount a NFS volume inside all the jobs to use as a cache, that under the hood uses GCP Filestore. Whilst it works it would be much nicer to have Concourse manage the lifecycle of a cache per job rather than us doing gnarly stuff like that.
Another approach that would require less refactoring but bring value would be to store the caches on a persistent BOSH volume, and keep the db entry when a worker gets recreated/deployed to with new stemcell/etc, this would also work with the Helm chart with persistent volumes I believe.
I think this would actually be pretty cheap to work in to the existing design - we already transfer around caches when a task or put step needs a cache that's not present on the worker already. But then we throw that volume away. If we instead marked it as an equivalent cache, they would warm across the cluster more rapidly.
This is interesting because we have already been discussing this as part of vmware-archive/architecture-rfcs#1 -- treating all artifacts as the same thing would require that we favor streaming caches over to the requisite worker as opposed to downloading new artifacts every time
Activity
JohannesRudolph commentedon Mar 31, 2018
Since the work on spaces has just started #1707, may I also add another scenario: sharing cache volumes between different "variants" of a job or task. We currently repeat many jobs 3 times in our pipeline to serve in build pipelines of different git branches (feature/*, develop, master). This causes us to have a lot more caches than we would need conceptually.
We use caches primarily to cache gradle and yarn's global package caches, and those could be easily shared between different "incarnations" of a job/task in our pipeline.
I'm referencing the spaces epic here because this kind of sharing may become a lot easier to implement with spaces.
bump etree tsa handlers mux clockwork goxmldsig genproto grpc
simonjohansson commentedon Jan 29, 2019
I second this issue.
We have a lot of pipelines(mostly Java/Scala/Kotlin, so often apps needs to download the universe) and therefore a lot of workers, which will at some point or another get recreated, sometimes every 24h, thus blowing away the cache.
What we currently do is mount a NFS volume inside all the jobs to use as a cache, that under the hood uses GCP Filestore. Whilst it works it would be much nicer to have Concourse manage the lifecycle of a cache per job rather than us doing gnarly stuff like that.
Another approach that would require less refactoring but bring value would be to store the caches on a persistent BOSH volume, and keep the db entry when a worker gets recreated/deployed to with new stemcell/etc, this would also work with the Helm chart with persistent volumes I believe.
vito commentedon Jan 29, 2019
I think this would actually be pretty cheap to work in to the existing design - we already transfer around caches when a
taskorputstep needs a cache that's not present on the worker already. But then we throw that volume away. If we instead marked it as an equivalent cache, they would warm across the cluster more rapidly.ddadlani commentedon Jul 30, 2019
This is interesting because we have already been discussing this as part of vmware-archive/architecture-rfcs#1 -- treating all artifacts as the same thing would require that we favor streaming caches over to the requisite worker as opposed to downloading new artifacts every time
taylorsilva commentedon Jan 6, 2025
Issue Bankruptcy
This issue is being closed as part of 2025's Issue Bankruptcy declaration. See here for details
If you think this issue still has merit then feel free to open a new issue and reference this one.