Re: Addressing buildpack size

Wayne E. Seguin

Because of very good compatibility between versions (post 1.X) I would like to make a motion to do the following:

Split the buildpack:

have the default golang buildpack track the latest golang version

Then handle older versions in one of two ways, either:

a) have a large secondary for older versions


b) have multiple, one for each version of golang, users can specify a specific URL if they care about specific versions.

This would improve space/time considerations for operations. Personally I would prefer b) because it allows you to enable supporting older go versions out of the box by design but still keeping each golang buildpack small.


Wayne E. Seguin <wayneeseguin(a) <mailto:wayneeseguin(a)>>
CTO ; Stark & Wayne, LLC

On May 4, 2015, at 12:40 , Mike Dalessio <mdalessio(a)> wrote:

Hi Wayne,

On Fri, May 1, 2015 at 1:29 PM, Wayne E. Seguin <wayneeseguin(a) <mailto:wayneeseguin(a)>> wrote:
What an incredible step in the right direction, Awesome!!!

Out of curiosity, why is the go buildpack still quite so large?

Thanks for asking this question.

Currently we're including the following binary dependencies in `go-buildpack`:

cache $ ls -lSh *_go*
-rw-r--r-- 1 flavorjones flavorjones 60M 2015-05-04 12:36 https___storage.googleapis.com_golang_go1.4.2.linux-amd64.tar.gz
-rw-r--r-- 1 flavorjones flavorjones 60M 2015-05-04 12:36 https___storage.googleapis.com_golang_go1.4.1.linux-amd64.tar.gz
-rw-r--r-- 1 flavorjones flavorjones 54M 2015-05-04 12:36 https___storage.googleapis.com_golang_go1.2.2.linux-amd64.tar.gz
-rw-r--r-- 1 flavorjones flavorjones 54M 2015-05-04 12:36 http___go.googlecode.com_files_go1.2.1.linux-amd64.tar.gz
-rw-r--r-- 1 flavorjones flavorjones 51M 2015-05-04 12:36 https___storage.googleapis.com_golang_go1.3.3.linux-amd64.tar.gz
-rw-r--r-- 1 flavorjones flavorjones 51M 2015-05-04 12:36 https___storage.googleapis.com_golang_go1.3.2.linux-amd64.tar.gz
-rw-r--r-- 1 flavorjones flavorjones 40M 2015-05-04 12:36 http___go.googlecode.com_files_go1.1.2.linux-amd64.tar.gz
-rw-r--r-- 1 flavorjones flavorjones 40M 2015-05-04 12:36 http___go.googlecode.com_files_go1.1.1.linux-amd64.tar.gz

One question we should ask, I think, is: should we still be supporting golang 1.1 and 1.2? Dropping those versions would cut the size of the buildpack in (approximately) half.

On May 1, 2015, at 11:54 , Mike Dalessio <mdalessio(a) <mailto:mdalessio(a)>> wrote:

Skinny buildpacks have been cut for go, nodejs, php, python and ruby buildpacks.

| | current | previous |
| go | 442MB | 633MB |
| nodejs | 69MB | 417MB |
| php | 804MB | 1.1GB |
| python | 454MB | 654MB |
| ruby | 365MB | 1.3GB |
| total | 2.1GB | 4.1GB |
for an aggregate 51% reduction in size. Details follow.

Next Steps

I recognize that every cloud operator may have a different policy on what versions of interpreters and libraries they want to support, based on the specific requirements of their users.

These buildpacks reflect a "bare mininum" policy for a cloud to be operable, and I do not expect these buildpacks to be adopted as-is by many operators.

These buildpacks have not yet been added to cf-release, specifically so that the community can prepare their own buildpacks if necessary.

Over the next few days, the buildpacks core team will ship documentation and tooling to assist you in packaging specific dependencies for your instance of CF. I'll start a new thread on this list early next week to communicate this information.

Call to Action

In the meantime, please think about whether the policy implemented in these buildpacks ("last two patches (or teenies) on all supported major.minor releases") is suitable for your users; and if not, think about what dependencies you'll ideally be supporting.

go-buildpack v1.3.0

Release notes are here <>.

Size reduced 30% from 633MB <> to 442MB <>.

Supports (full manifest here <>):

golang 1.4.{1,2}
golang 1.3.{2,3}
golang 1.2.{1,2}
golang 1.1.{1,2}
nodejs-buildpack v1.3.0

Full release notes are here <>.

Size reduced 83% from 417MB <> to 69MB <>.

Supports (full manifest here <>):

php-buildpack v3.2.0

Full release notes are here <>.

Size reduced 27% from 1.1GB <> to 803MB <>.

Supports: (full manifest here <>)


HHVM (lucid64 stack):

HHVM (cflinuxfs2 stack):

Apache HTTPD:


python-buildpack v1.3.0

Full release notes are here <>.

Size reduced 30% from 654MB <> to 454MB <>.

Supports: (full manifest here <>)

ruby-buildpack v1.4.0

Release notes are here <>.

Size reduced 71% from 1.3GB <> to 365MB <>.

Supports: (full manifest here <>)




---------- Forwarded message ----------
From: Mike Dalessio <mdalessio(a) <mailto:mdalessio(a)>>
Date: Wed, Apr 8, 2015 at 11:10 AM
Subject: Addressing buildpack size
To: vcap-dev(a) <mailto:vcap-dev(a)>

Hello vcap-dev!

This email details a proposed change to how Cloud Foundry buildpacks are packaged, with respect to the ever-increasing number of binary dependencies being cached within them.

This proposal's permanent residence is here: <>
Feel free to comment there or reply to this email.

Buildpack Sizes

Where we are today

Many of you have seen, and possibly been challenged by, the enormous sizes of some of the buildpacks that are currently shipping with cf-release.

Here's the state of the world right now, as of v205:

php-buildpack: 1.1G
ruby-buildpack: 922M
go-buildpack: 675M
python-buildpack: 654M
nodejs-buildpack: 403M
total: 3.7G
These enormous sizes are the result of the current policy of packaging every-version-of-everything-ever-supported ("EVOEES") within the buildpack.

Most recently, this problem was exacerbated by the fact that buildpacks now contain binaries for two rootfses.

Why this is a problem

If continued, buildpacks will only continue to increase in size, leading to longer and longer build and deploy times, longer test times, slacker feedback loops, and therefore less frequent buildpack releases.

Additionally, this also means that we're shipping versions of interpreters, web servers, and libraries that are deprecated, insecure, or both. Feedback from CF users has made it clear that many companies view this as an unnecessary security risk.

This policy is clearly unsustainable.

What we can do about it

There are many things being discussed to ameliorate the impact that buildpack size is having on the operations of CF.

Notably, Onsi has proposed a change to buildpack caching, to improve Diego staging times (link to proposal <>).

However, there is an immediate solution available, which addresses both the size concerns as well as the security concern: packaging fewer binary dependencies within the buildpack.

The proposal

I'm proposing that we reduce the binary dependencies in each buildpack in a very specific way.

Aside on terms I'll use below:

Versions of the form "1.2.3" are broken down as: MAJOR.MINOR.TEENY. Many language ecosystems refer to the "TEENY" as "PATCH" interchangeably, but we're going to use "TEENY" in this proposal.
We'll assume that TEENY gets bumped for API/ABI compatible changes.
We'll assume that MINOR and MAJOR get bumped when there are API/ABI incompatible changes.
I'd like to move forward soon with the following changes:

For language interpreters/compilers, we'll package the two most-recent TEENY versions on each MAJOR.MINOR release.
For all other dependencies, we'll package only the single most-recent TEENY version on each MAJOR.MINOR release.
We will discontinue packaging versions of dependencies that have been deprecated.
We will no longer provide "EVOEES" buildpack releases.
We will no longer provide "online" buildpack releases, which download dependencies from the public internet.
We will document the process, and provide tooling, for CF operators to build their own buildpacks, choosing the dependencies that their organization wants to support or creating "online" buildpacks at operators' discretion.
An example for #1 is that we'll go from packaging 34 versions of node v0.10.x to only packaging two: 0.10.37 and 0.10.38.

An example for #2 is that we'll go from packaging 3 versions of nginx 1.5 in the PHP buildpack to only packaging one: 1.5.12.

An example for #3 is that we'll discontinue packaging ruby 1.9.3 in the ruby-buildpack, which reached end-of-life in February 2015.


With these changes, the total buildpack size will be reduced greatly. As an example, we expect the ruby-buildpack size to go from 922M to 338M.

We also want to set the expectation that, as new interpreter versions are released, either for new features or (more urgently) for security fixes, we'll release new buildpacks much more quickly than we do today. My hope is that we'll be able to do it within 24 hours of a new release.


These changes will be relatively easy to make, since all the buildpacks are now using a manifest.yml file to declare what's being packaged. We expect to be able to complete this work within the next two weeks.

Stories are in the Tracker backlog under the Epic named "skinny-buildpacks", which you can see here: <>
Please let me know how these changes will impact you and your organizations, and let me know of any counter-proposals or variations you'd like to consider.



cf-dev mailing list
cf-dev(a) <mailto:cf-dev(a)> <>

Join { to automatically receive all group messages.