# Store compiled Rubies to reduce time backfilling

**URL:** https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40
**Category:** Uncategorized
**Created:** [February 17, 2015, 5:07pm UTC](https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40 "2015-02-17T17:07:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/rubybench/original/1X/4ae23b7eff9a1b039e126f05dd734ab09c8ab4b5.png) [@system](https://community.rubybench.org/u/system)
#### Post date: [February 17, 2015, 5:07pm UTC](https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40/1 "2015-02-17T17:07:47Z")

</div>

We have to current recompile Ruby each time we re-run a benchmark for a certain commit. It would be nice if we could just compile once and store it somewhere, use it when required instead of re-compiling everytime. This would also allow us to quickly backfill a new benchmark that has been added.

---

<div class="post-metadata">

### Author: ![sam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rubybench.org/sam/32/5_2.png) [@sam](https://community.rubybench.org/u/sam)
#### Post date: [March 3, 2015, 10:43pm UTC](https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40/2 "2015-03-03T22:43:03Z")

</div>

Yes, we got to do this. My thoughts here were to run a “private registry”

You have a new base image every say 100 commits and then push delta images for every commit thereafter.

That way its trivial to start a docker instance with any commit you need.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/rubybench/original/1X/4ae23b7eff9a1b039e126f05dd734ab09c8ab4b5.png) [@system](https://community.rubybench.org/u/system)
#### Post date: [March 4, 2015, 7:37am UTC](https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40/3 "2015-03-04T07:37:39Z")

</div>

@sam I’m not sure what delta images mean.

---

<div class="post-metadata">

### Author: ![sam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rubybench.org/sam/32/5_2.png) [@sam](https://community.rubybench.org/u/sam)
#### Post date: [March 5, 2015, 10:26pm UTC](https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40/4 "2015-03-05T22:26:10Z")

</div>

Sorry, so you create a base docker image with a particular ruby version.

Then you use that as the base image in the dockerfile and overwrite the ruby directory with current version and recompile.

This means that you have 1 docker image for EVERY ruby build, but… since you are only storing diffs with AUFS the diff between a ruby build today and one tomorrow is tiny so the docker images will be quite small.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/rubybench/original/1X/4ae23b7eff9a1b039e126f05dd734ab09c8ab4b5.png) [@system](https://community.rubybench.org/u/system)
#### Post date: [March 7, 2015, 5:46pm UTC](https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40/5 "2015-03-07T17:46:18Z")

</div>

Ic! If my understanding of Docker is correct, does that mean we’re only writing another layer above the base image which therefore mean that we’re only storing one base image (which is where the bulk of disk space is taken up) making the docker images small.

---

<div class="post-metadata">

### Author: ![sam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rubybench.org/sam/32/5_2.png) [@sam](https://community.rubybench.org/u/sam)
#### Post date: [March 9, 2015, 2:27am UTC](https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40/6 "2015-03-09T02:27:56Z")

</div>

pretty much, read up about various layring filesystems like aufs/overlayfs. Docker images are composed of N layers so by picking a “fat” initial layer and thin “composed” layer you are saving on storage.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/rubybench/original/1X/4ae23b7eff9a1b039e126f05dd734ab09c8ab4b5.png) [@system](https://community.rubybench.org/u/system)
#### Post date: [March 10, 2015, 1:03pm UTC](https://community.rubybench.org/t/store-compiled-rubies-to-reduce-time-backfilling/40/7 "2015-03-10T13:03:33Z")

</div>

Ok I’ll go read up on those topics!
