Artifact Storage Calculator
Estimate total Jenkins artifact storage from build frequency, average artifact size, and the number of builds' artifacts retained.
Inputs
Average number of builds that archive artifacts per day.
Average size of artifacts archived per build.
Number of most recent builds whose artifacts are kept before rotation/deletion.
Total Artifact Storage
4.395GB
Daily Storage Growth (Pre-Rotation)
6,000.0MB
Retention Window
0.75days
Step by step
Storage = builds retained × avg artifact size
30 × 150MB
= 4500.0MB (4.39GB)
Daily growth before rotation
40 × 150MB
= 6000.0MB/day
Retention window in days
30 ÷ 40
= 0.75 days
How it works
Jenkins archives artifacts per build and, without a retention policy, storage grows unbounded at the daily rate of builds × average artifact size. Configuring 'discard old builds' to keep only the artifacts of the N most recent builds caps steady-state storage at that retention count multiplied by average artifact size, regardless of how many builds run per day — though a higher build rate means that fixed retention count covers a shorter calendar window.
Formula
storage = retentionBuilds × avgArtifactSize
- R
- Number of builds retained
- A
- Average artifact size in MB
- S
- Total artifact storage in MB
Frequently Asked Questions
Does Jenkins delete artifacts automatically?
Only if configured — the 'Discard Old Builds' job property (or `buildDiscarder` in pipeline syntax) can cap retention by build count and/or age; without it, archived artifacts accumulate indefinitely on the Jenkins controller or configured artifact storage.
Should artifacts be stored on the Jenkins controller or externally?
For any non-trivial scale, external artifact storage (S3, Artifactory, Nexus) is strongly preferred — keeping large binaries on the Jenkins controller's disk risks filling it and slowing down the controller for all jobs, not just the ones producing large artifacts.
How can I reduce artifact storage without losing traceability?
Archive only the essential outputs (final binaries/images, not intermediate build directories), compress before archiving, and retain full artifacts only for builds that were actually deployed while keeping lightweight metadata/logs for the rest.