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

Add instruction cache #60

Merged
merged 2 commits into from
Jul 7, 2017
Merged

Conversation

tonistiigi
Copy link
Member

First implementation of instruction cache using the precalculation method. Content based hashing will need updates better to implement copy before that. This method should always apply to all vertexes.

» ./buildkit --target containerd  | buildctl build
INFO[0000] tracing logs to /tmp/buildctl474429996
[+] Building 14.0s (24/24) FINISHED
 => docker-image://docker.io/library/alpine:latest                                                    0.0s
 => => resolve docker.io/library/alpine:latest                                                        0.5s
 => docker-image://docker.io/library/golang:1.8-alpine                                                0.0s
 => => resolve docker.io/library/golang:1.8-alpine                                                    0.4s
 => CACHED apk add --no-cache g++ linux-headers                                                       0.0s
 => CACHED apk add --no-cache git make                                                                0.0s
 => CACHED apk add --no-cache git                                                                     0.0s
 => CACHED git clone https://github.com/moby/buildkit.git /go/src/github.com/moby/buildkit            0.0s
 => CACHED git checkout -q master                                                                     0.0s
 => CACHED cp -a /src/go /dest/                                                                       0.0s
 => go build -o /bin/buildd-containerd -tags containerd ./cmd/buildd                                  8.4s
 => CACHED go build -o /bin/buildctl ./cmd/buildctl                                                   0.0s
 => CACHED cp -a /src/bin/buildctl /dest/bin/                                                         0.0s
 => CACHED git clone https://github.com/opencontainers/runc.git /go/src/github.com/opencontainers/ru  0.0s
 => apk add --no-cache btrfs-progs-dev                                                                4.8s
 => git clone https://github.com/containerd/containerd.git /go/src/github.com/containerd/containerd   3.1s
 => CACHED git checkout -q v1.0.0-rc3                                                                 0.0s
 => CACHED cp -a /src/go /dest/                                                                       0.0s
 => CACHED go build -o /usr/bin/runc ./                                                               0.0s
 => CACHED cp -a /src/usr/bin/runc /dest/bin/                                                         0.0s
 => git checkout -q master                                                                            0.2s
 => cp -a /src/go /dest/                                                                              0.3s
 => make bin/containerd                                                                               8.5s
 => cp -a /src/go/src/github.com/containerd/containerd/bin/containerd /dest/bin/                      0.1s
 => cp -a /src/bin/buildd-containerd /dest/bin/                                                       0.1s
 => ls -l /bin

@AkihiroSuda

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@AkihiroSuda
Copy link
Member

It might be good to create separate boltdb bucket like _instructioncache for ease of debugging, but it can be later

@AkihiroSuda AkihiroSuda merged commit a4b1a78 into moby:master Jul 7, 2017
goller added a commit to goller/buildkit that referenced this pull request Oct 20, 2023
perf: switch num concurrent layer fetch/push to 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants