Should there be a mechanism to reap builds? #5879
Unanswered
evanchaoli
asked this question in
Ideas
Replies: 1 comment 2 replies
-
Even without proper support in Concourse, as a first step it would be really handy to have a SQL script to safely prune the database of builds older than n days. Our db just keeps growing and growing, db load and query performance really suffer because we have millions of builds going back to 2018. If we could easily+safely delete everything e.g. < 2020 that would be a big win. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Concourse has a mechanism to reap build logs, but I'm not aware a way to reap builds, looks like to me the table
builds
just keeps growing. Our prod cluster now has 0.7M tuples inbuilds
, I'm afraid that once tablebuilds
holds millions of tuples, the overall performance could be badly impacted.After some investigation, I found some pipelines run periodical jobs every few minutes similar to cron jobs, which contributes significant amount of total builds. The pipeline owners agreed that they don't need to retain all builds, but they don't know how to reap old builds.
Similar to
build_log_retention_policy
, I think we should supportbuild_retention_policy
. If a job doesn't configurebuild_retention_policy
, Concourse may by default retain all builds of the job; but if a job may configures to retain at most, say 500 builds, or last 30 days' builds, then Concourse should reap old builds of the job.This feature would help limit size of table
builds
, and thus benefit overall performance of Concourse, and make a Concourse cluster to be able to host more pipelines.Beta Was this translation helpful? Give feedback.
All reactions