Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache compressed local base image layers #1957

Merged
merged 19 commits into from
Sep 12, 2019
Merged

Conversation

TadCordle
Copy link
Contributor

@TadCordle TadCordle commented Sep 5, 2019

Part of #1912.

I did some manual tests and here is how long each build took, running jibBuildDocker on a small test project with the following base images.

docker://gcr.io/distroless/java

  • First build: 8s
  • Second build: 3s

tar://distroless.tar

  • First build: 6s
  • Second build: 1s

docker://openjdk:8

  • First build: 30s
  • Second build: 9s

tar://openjdk.tar

  • First build: 22s
  • Second build: 2s

This is a pretty big improvement; it seems the next bottleneck to overcome is the docker save that runs with a docker:// base image.

@TadCordle TadCordle changed the title Cache local base image layers Cache compressed local base image layers Sep 5, 2019
Copy link
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just went over at a high level to see the general direction.

@TadCordle TadCordle marked this pull request as ready for review September 9, 2019 20:29
@TadCordle TadCordle requested a review from a team September 9, 2019 20:30
@TadCordle
Copy link
Contributor Author

I think this should be mostly good for review.

Copy link
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis is failing. Did you rename the branch at some point?

warning: Could not find remote branch fix-skaffold-init to clone.

@TadCordle
Copy link
Contributor Author

Travis is failing. Did you rename the branch at some point?

Hmm, I did accidentally start the skaffold fix on this branch so I needed to revert some stuff, I must have messed up and renamed this branch instead of making a new one. I'll fix it tomorrow.

@TadCordle TadCordle requested a review from a team September 12, 2019 16:16
Copy link
Member

@chanseokoh chanseokoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully one day, we restructure the cache to have consistency between local and remote layers in cache and remove some duplicate code, but that sounds like needing more thoughts (#1982).

@TadCordle TadCordle merged commit cdb696f into master Sep 12, 2019
@TadCordle TadCordle deleted the cache-local-base-layers branch September 12, 2019 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants