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

Speed up pushing layer to local cache #1313

Closed
kerthcet opened this issue Jun 12, 2020 · 3 comments
Closed

Speed up pushing layer to local cache #1313

kerthcet opened this issue Jun 12, 2020 · 3 comments
Labels
area/performance issues related to kaniko performance enhancement

Comments

@kerthcet
Copy link

Part of my config:

      command:
        - /kaniko/executor
      args:
        - --context=dir:///$(params.pathToContext)
        - --dockerfile=$(params.pathToDockerfile)
        - --destination=$(resources.outputs.buildImage.url)
        - --cache=true
        - --cache-dir=/kaniko-cache

However, it's too slow, i used kaniko in tektoncd. Here's the result, lt takes for almost 30min. tbcd-bmjg8-task-build-docker-image-g77cd-pod-5g7cr 0/4 Completed 0 28m, how to speed up the building.

@kerthcet
Copy link
Author

part of log:

INFO[0046] RUN go mod download
INFO[0046] Found cached layer, extracting to filesystem
INFO[0052] COPY . ${WORKDIR}/
INFO[0052] Resolving 298 paths
INFO[0052] Taking snapshot of files...
INFO[0052] Pushing layer registry/xxx/authservice/cache:1d81cf67542851ede46bb37265d2d63b9e87cd67b78dac2f3d198938dbf1a755 to cache now
INFO[0052] RUN go build -o ${WORKDIR}/server ${WORKDIR}/main.go
INFO[0052] Taking snapshot of full filesystem...
INFO[0061] Resolving 28025 paths
INFO[0065] cmd: /bin/sh
INFO[0065] args: [-c go build -o ${WORKDIR}/server ${WORKDIR}/main.go]
INFO[0065] Running: [/bin/sh -c go build -o ${WORKDIR}/server ${WORKDIR}/main.go]
INFO[0068] Taking snapshot of full filesystem...
INFO[0072] Resolving 28491 paths
INFO[0075] Pushing layer registry/xxx/cache:02a2be3cc0c8ff402f4b5ec67b5b91f2aa72c5e702dbc60edb537fb8689f071f to cache now

@tejal29
Copy link
Contributor

tejal29 commented Jun 13, 2020

@yaphetsglhf Can you please try the images described in #1305. You could compare the time
with
--snapshotMode=redo and --use-new-run and see if that speeds up your build.

@tejal29 tejal29 added the area/performance issues related to kaniko performance enhancement label Jun 13, 2020
@kerthcet
Copy link
Author

it works, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance issues related to kaniko performance enhancement
Projects
None yet
Development

No branches or pull requests

2 participants