<p>Complementing Evgeny's answer with a few more examples.</p>

<p>What you mean by build size may matter a bit: </p>

<ul>
<li><p>if it is the size of the artifact(s) being built (each one individually or their combined size) - that could matter in artifact storing or use/deployment operations if those operations have size limits and they are exceeded. For example Google App Engine apps has such <a href="https://cloud.google.com/appengine/quotas#Deployments" rel="noreferrer">deployment limits</a>, if reached deployments would fail, see <a href="https://stackoverflow.com/questions/54190686/error-when-deploying-to-google-app-engine">Error when deploying to Google App Engine</a>.</p></li>
<li><p>if it is the size of the workspace in which you perform the build it may matter from the workspace management perspective. Even 2G may be significant - for example if you're building in a RAM filesystem on a machine with not a lot of RAM. But some builds could a lot bigger - I had to deal with 500G+ workspaces (when most of my server disks were below 1T).</p></li>
</ul>

<p>If the build is part of your CI/CD pipeline then the larger the build size the longer will the pipeline execution time be (performing the actual build and, if applicable, archiving, deploying for testing, analyzing in case of failure, cleaning up, etc.) - the slower/riskier/costlier your overall development may be.</p>

<p>If you hit a hard limit you'll have to get creative to work around it (not always simple/possible). If it's just a performance/cost hit you also have the option of accepting and living with it and/or addressing it partially/gradually.</p>

<p>It may be worthy to distinguish between:</p>

<ul>
<li>bloated builds - when size is unnecessarily increased - fixing the problem is usually possible by dropping unnecessary parts</li>
<li>the cases in which the content of the build itself is what's really needed - the size doesn't matter as much - it is needed, the only way to address may be by sacrificing some functionality</li>
</ul>

CC BY-SA 4.0
2019-02-18T17:30:27.600Z
2019-02-18T17:30:27.600Z
Dan Cornilescu
<p>I'll add a very concrete issue that we actually run into. It's a sideeffect of bad architecture that we're suffering currently:</p>

<p>Since our build is large and we need to load a lot of dependencies simply putting it all together takes a very long time. We should have long since divided the build up into numerous small builds as an approach to a microservice architecture instead of one large monolith.</p>

<p>Running all tests for the monolith takes around 45 minutes and blocks our CI environment for the time being.</p>

<p>Since it's so load intensive and takes such a long time it's currently impossible for us to run multiple builds parallel to each other.</p>

<p>So, as posters before me have already stated on a more theoretical level, this should showcase some potential (and likely) side-implications a large build usually has outside of needing more space on the harddrive.</p>

CC BY-SA 4.0
2019-03-07T13:58:42.330Z
2019-03-07T13:58:42.330Z
Worp
<p>When I raise build size issue as a concern, it usually doesn't come from "it is so big, it will be expensive to store it".</p>

<p>The main problems with large builds are the following -</p>

<ul>
<li>increased shipping time. moving big bits from place to place frequently is time consuming.</li>
<li>frequent changes to big artifacts plus a large enoug retention period make storing such artifacts become costly, less so with layered artifacts like docker images.</li>
<li>creating such big artifacts usually is time consuming, more so than creating much smaller artifacts. automating the process to create smaller artifacts might take time, but the automation that is repeatable should be as short as possible to allow for fast feedback.</li>
<li>recovering from failure (depending on configuration) might take more time with larger artifacts, especially when an older artifact needs to be reapplied instead of a faulty new-er one.</li>
</ul>

<p>I subscribe to the four devops metrics:</p>

<ul>
<li>Lead time for changes - shorten it</li>
<li>Deployment frequency - increase the frequency</li>
<li>Time to restore service - shorten it</li>
<li>Change failure rate - reduce it to never</li>
</ul>

<p>Large artifacts usually create a problem in each of these metrics, and none of these metrics are really concerned with the cost of storage really - because that is cheap, time is expensive.</p>

CC BY-SA 4.0
2019-02-18T09:05:22.443Z
2019-02-18T09:05:22.443Z
Evgeny Zislis
<p>I often hear (from people, but also from informative CLIs) that the "build/slug size is large". This is particularly so when the build is 0.5 - 2 GB in size</p>

<p>Why (or under what circumstances) is build size such a concern? </p>

<p>Note: the reason I ask is because I see resources like storage and compute as being relatively cheap compared to in the past, so, if anything, I would expect build size to be less of an issue now than in the past</p>

CC BY-SA 4.0
2019-03-07T15:25:14.053Z
You need to look at how often you build, how many different projects are being built, how many branches you are building, and how many builds you retain (to allow revert of a bad release, or perhaps for auditors). Multiply it out to get not only disk space, but network bandwidth. E.g. a 200MB build * 20 microservices * 5 builds per day = 20GB/day. If you build 200 days of the year, that's 4TB/year. For network and disk, also factor in developers downloading them over WiFi, and storing them on small SSDs.
BMitch
<builds>
Why is build size such a concern?
stevec
# Why is build size such a concern?

(Asked by: username_0 on 2019-02-18)

I often hear (from people, but also from informative CLIs) that the "build/slug size is large". This is particularly so when the build is 0.5 - 2 GB in size

Why (or under what circumstances) is build size such a concern?

Note: the reason I ask is because I see resources like storage and compute as being relatively cheap compared to in the past, so, if anything, I would expect build size to be less of an issue now than in the past

**Tags:** builds

> **Comments:**
> **username_1**: You need to look at how often you build, how many different projects are being built, how many branches you are building, and how many builds you retain (to allow revert of a bad release, or perhaps for auditors). Multiply it out to get not only disk space, but network bandwidth. E.g. a 200MB build * 20 microservices * 5 builds per day = 20GB/day. If you build 200 days of the year, that's 4TB/year. For network and disk, also factor in developers downloading them over WiFi, and storing them on small SSDs.  

---

## 3 answers

### Answer by username_4 on 2019-02-18. Score: 11 | Accepted answer

When I raise build size issue as a concern, it usually doesn't come from "it is so big, it will be expensive to store it".

The main problems with large builds are the following -

* increased shipping time. moving big bits from place to place frequently is time consuming.
* frequent changes to big artifacts plus a large enoug retention period make storing such artifacts become costly, less so with layered artifacts like docker images.
* creating such big artifacts usually is time consuming, more so than creating much smaller artifacts. automating the process to create smaller artifacts might take time, but the automation that is repeatable should be as short as possible to allow for fast feedback.
* recovering from failure (depending on configuration) might take more time with larger artifacts, especially when an older artifact needs to be reapplied instead of a faulty new-er one.

I subscribe to the four devops metrics:

* Lead time for changes - shorten it
* Deployment frequency - increase the frequency
* Time to restore service - shorten it
* Change failure rate - reduce it to never

Large artifacts usually create a problem in each of these metrics, and none of these metrics are really concerned with the cost of storage really - because that is cheap, time is expensive.


---

### Answer by username_2 on 2019-02-18. Score: 6

Complementing Evgeny's answer with a few more examples.

What you mean by build size may matter a bit:

* if it is the size of the artifact(s) being built (each one individually or their combined size) - that could matter in artifact storing or use/deployment operations if those operations have size limits and they are exceeded. For example Google App Engine apps has such [deployment limits](https://cloud.google.com/appengine/quotas#Deployments), if reached deployments would fail, see [Error when deploying to Google App Engine](https://stackoverflow.com/questions/54190686/error-when-deploying-to-google-app-engine).
* if it is the size of the workspace in which you perform the build it may matter from the workspace management perspective. Even 2G may be significant - for example if you're building in a RAM filesystem on a machine with not a lot of RAM. But some builds could a lot bigger - I had to deal with 500G+ workspaces (when most of my server disks were below 1T).

If the build is part of your CI/CD pipeline then the larger the build size the longer will the pipeline execution time be (performing the actual build and, if applicable, archiving, deploying for testing, analyzing in case of failure, cleaning up, etc.) - the slower/riskier/costlier your overall development may be.

If you hit a hard limit you'll have to get creative to work around it (not always simple/possible). If it's just a performance/cost hit you also have the option of accepting and living with it and/or addressing it partially/gradually.

It may be worthy to distinguish between:

* bloated builds - when size is unnecessarily increased - fixing the problem is usually possible by dropping unnecessary parts
* the cases in which the content of the build itself is what's really needed - the size doesn't matter as much - it is needed, the only way to address may be by sacrificing some functionality


---

### Answer by username_3 on 2019-03-07. Score: 3

I'll add a very concrete issue that we actually run into. It's a sideeffect of bad architecture that we're suffering currently:

Since our build is large and we need to load a lot of dependencies simply putting it all together takes a very long time. We should have long since divided the build up into numerous small builds as an approach to a microservice architecture instead of one large monolith.

Running all tests for the monolith takes around 45 minutes and blocks our CI environment for the time being.

Since it's so load intensive and takes such a long time it's currently impossible for us to run multiple builds parallel to each other.

So, as posters before me have already stated on a more theoretical level, this should showcase some potential (and likely) side-implications a large build usually has outside of needing more space on the harddrive.


---

