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

Slow build time on Minikube reported #1204

Closed
nicolaferraro opened this issue Jan 15, 2020 · 5 comments
Closed

Slow build time on Minikube reported #1204

nicolaferraro opened this issue Jan 15, 2020 · 5 comments
Labels
area/build-operator Related to the internal image build operator
Milestone

Comments

@nicolaferraro
Copy link
Member

I've got some reports of build time on Minikube taking more than 10 mins recently.

The slowest phase seems to be Kaniko downloading the base image and pushing to the internal registry. It may also be slow because the Kaniko cache is now disabled, but 10 mins with a fast internet connection (200 Mbps) is not acceptable even for the first build.

I wonder if we can find a faster strategy for Minikube users or for the development phase, when you want to run everything as soon as possible.

@nicolaferraro nicolaferraro added this to the 1.0.0-RC2 milestone Jan 15, 2020
@Namphibian
Copy link

Running into very slow builds on my local machine using minikube.

  1. hello.groovy example initially took over 5 minutes to get started.
  2. Rest-with-undertow is taking a massive amount of time and I gave up after 10 minutes.

See my log below;

cornelius@namphi-ubuntu:~/git/camel-k$ kamel run examples/routes.groovy -n kamel

cornelius@namphi-ubuntu:~$ kubectl get po --watch -n kamel

NAME                                READY   STATUS    RESTARTS   AGE
camel-k-operator-85789d59c4-hm7ln   1/1     Running   0          119m
camel-k-kit-bp0vkrr8vs62q8k998a0-builder   0/1     Pending   0          0s
camel-k-kit-bp0vkrr8vs62q8k998a0-builder   0/1     Pending   0          0s
camel-k-kit-bp0vkrr8vs62q8k998a0-builder   0/1     Init:0/1   0          0s
camel-k-kit-bp0vkrr8vs62q8k998a0-builder   0/1     Init:0/1   0          1s
camel-k-kit-bp0vkrr8vs62q8k998a0-builder   0/1     PodInitializing   0          117s
camel-k-kit-bp0vkrr8vs62q8k998a0-builder   1/1     Running           0          118s
camel-k-kit-bp0vkrr8vs62q8k998a0-builder   0/1     Completed         0          5m28s
routes-79484b4794-hsnx5                    0/1     Pending           0          0s
routes-79484b4794-hsnx5                    0/1     Pending           0          0s
routes-79484b4794-hsnx5                    0/1     ContainerCreating   0          0s
routes-79484b4794-hsnx5                    1/1     Running             0          16s

I am on a 100 Mbps fibre connection. I checked and downloads where not bad on other sites.

@Namphibian
Copy link

So I did some digging.

I had Istio installed in demo mode(learning Knative,Istio, Kamel and Quarkus atm) and this seems to have affected the build times.

Installing Istio with a minimal profile sped up the quite a bit.

Note that the KNative documentation uses Helm install for Istio which is being deprecated.

cornelius@namphi-ubuntu:~/git/kamel-one$ kubectl get po --watch  
NAME                                READY   STATUS              RESTARTS   AGE
camel-k-operator-85789d59c4-6knhm   0/1     ContainerCreating   0          95s
camel-k-operator-85789d59c4-6knhm   1/1     Running             0          2m25s
camel-k-kit-bp13ekd82u4vr1fk3k3g-builder   0/1     Pending             0          0s
camel-k-kit-bp13ekd82u4vr1fk3k3g-builder   0/1     Pending             0          0s
camel-k-kit-bp13ekd82u4vr1fk3k3g-builder   0/1     Init:0/1            0          0s
camel-k-kit-bp13ekd82u4vr1fk3k3g-builder   0/1     Init:0/1            0          2s
camel-k-kit-bp13ekd82u4vr1fk3k3g-builder   0/1     PodInitializing     0          115s
camel-k-kit-bp13ekd82u4vr1fk3k3g-builder   1/1     Running             0          2m3s
camel-k-kit-bp13ekd82u4vr1fk3k3g-builder   0/1     Completed           0          2m29s
hello-55fd6dc546-5994c                     0/1     Pending             0          0s
hello-55fd6dc546-5994c                     0/1     Pending             0          0s
hello-55fd6dc546-5994c                     0/1     ContainerCreating   0          0s
hello-55fd6dc546-5994c                     1/1     Running             0          2s

@astefanutti
Copy link
Member

@Namphibian we are working on #1256 that should ideally improve the build time and open new possibilities, like possibly interacting directly with the Docker daemon on Minikube for faster development cycles.

@astefanutti astefanutti added the area/build-operator Related to the internal image build operator label Feb 11, 2020
@astefanutti
Copy link
Member

Buildah support has been merged in #1256, which now becomes the default builder on Minikube. It should improve the average build time. More optimisations will be delivered as part of #681, in order to achieve average build time below a minute.

@nicolaferraro
Copy link
Member Author

Fixed by #1259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-operator Related to the internal image build operator
Projects
None yet
Development

No branches or pull requests

3 participants