Skip to content

Q: Performance expectations with storing go-cache in remote registry? #161

@genevieve

Description

@genevieve

What happened?

  • What were you attempting to do?

Using the new pack cli's --publish and --cache-image flags to store an image in a remote registry and pull down the cache for reuse on rebuilds.

  • What did you expect to happen?

I think I expected this to be fast albeit not as fast as local caches. Since our CI's local cache reuse is not always stable, we were interested in using the pack supported way with a remote registry for reuse in CI jobs for the same app code sha. I was really surprised by how much more time was added to the build just due to storing the gocache in the remote registry. Sharing the timestamped logs here in case there's anything you can think of to improve it.

  • What was the actual behavior? Please provide log output, if possible.

About 2 minutes of a 3 minute rebuild was spent here:

2021/04/09 17:19:48.230688 Reusing cache layer 'paketo-buildpacks/go-dist:go'
Layer 'paketo-buildpacks/go-dist:go' SHA: sha256:78473bd74cb16be010b30de44123937411ec5345e6487592948af576322e843f
2021/04/09 17:19:49.566066 Adding cache layer 'paketo-buildpacks/go-build:gocache'
Layer 'paketo-buildpacks/go-build:gocache' SHA: sha256:dff9783e8c4c0218288ea0707c752f8cb6f2853da6bf5a24f9b1f1dbec9b100e
2021/04/09 17:21:54.751842 ...

While this is a small go app, I'm concerned about larger go apps that we have.

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.

pack v0.18.0

  • What buildpacks are you using? Please include versions.
2021/04/09 17:19:21.124298 Paketo Go Distribution Buildpack 0.3.1

2021/04/09 17:19:21.130936 Paketo Go Mod Vendor Buildpack 0.2.0

2021/04/09 17:19:21.135420 Paketo Go Build Buildpack 0.3.0
  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?

Default builder from paketo in pack

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

github.com/genevieve/leftovers

Checklist

  • I have included log output.
  • The log output includes an error message.
  • I have included steps for reproduction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions