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

Extract preloaded tarball as soon as minikube volume is created (2.5s speedup) #7490

Merged
merged 4 commits into from
Apr 9, 2020

Conversation

priyawadhwa
Copy link

Extracting preload currently takes 6 seconds. This PR begins preload extraction as soon as the minikube volume is created, and runs it in parallel with creating the container node and setting up SSH.

This shaves 2-3 seconds off of node.StartHost

Extracting preload currently takes 6 seconds. This PR begins preload extraction as soon as the minikube volume is created, and runs it in parallell with creating the container node and setting up SSH.

This shaves 2-3 secnods off of `node.StartHost`
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 7, 2020
@priyawadhwa priyawadhwa changed the title Extract preloaded tarball as soon as minikube volume is created Extract preloaded tarball as soon as minikube volume is created (2.5 s speedup) Apr 7, 2020
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 7, 2020
@priyawadhwa priyawadhwa changed the title Extract preloaded tarball as soon as minikube volume is created (2.5 s speedup) Extract preloaded tarball as soon as minikube volume is created (2.5s speedup) Apr 7, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: priyawadhwa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from medyagh and RA489 April 7, 2020 21:23
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2020
@priyawadhwa
Copy link
Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 7, 2020
@codecov-io
Copy link

Codecov Report

Merging #7490 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7490   +/-   ##
=======================================
  Coverage   37.08%   37.08%           
=======================================
  Files         146      146           
  Lines        8870     8870           
=======================================
  Hits         3289     3289           
  Misses       5192     5192           
  Partials      389      389           

@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

pkg/drivers/kic/kic.go Outdated Show resolved Hide resolved
pkg/drivers/kic/oci/oci.go Outdated Show resolved Hide resolved
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

looks exciting, minor changes requested plz see comments

pkg/drivers/kic/oci/oci.go Show resolved Hide resolved
@minikube-pr-bot
Copy link

All Times minikube: [ 69.636605 64.208438 65.730780]
All Times Minikube (PR 7490): [ 64.951599 68.948185 68.189655]

Average minikube: 66.525274
Average Minikube (PR 7490): 67.363147

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 7490) |
+----------------------+-----------+--------------------+
| minikube v           |  0.166429 |           0.150897 |
| Creating kvm2        | 41.784129 |          41.599091 |
| Preparing Kubernetes | 22.316794 |          23.665836 |
| Pulling images       |           |                    |
| Launching Kubernetes |           |                    |
| Waiting for cluster  |           |                    |
+----------------------+-----------+--------------------+

pkg/drivers/kic/oci/oci.go Show resolved Hide resolved
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

Looks good to me. lets wait for tests

@minikube-pr-bot
Copy link

All Times minikube: [ 64.292363 65.815860 65.294435]
All Times Minikube (PR 7490): [ 65.257400 66.269431 63.419928]

Average minikube: 65.134219
Average Minikube (PR 7490): 64.982253

Averages Time Per Log

+----------------------+-----------+--------------------+
|         LOG          | MINIKUBE  | MINIKUBE (PR 7490) |
+----------------------+-----------+--------------------+
| minikube v           |  0.149420 |           0.153726 |
| Creating kvm2        | 40.598551 |          40.518903 |
| Preparing Kubernetes | 22.169309 |          22.250597 |
| Pulling images       |           |                    |
| Launching Kubernetes |           |                    |
| Waiting for cluster  |           |                    |
+----------------------+-----------+--------------------+

@medyagh
Copy link
Member

medyagh commented Apr 8, 2020

Docker Linux

W0408 14:03:15.853435    7272 exit.go:101] startup failed: Wait failed: waiting for apps_running: waitings for k8s app running: missing components: kube-dns
start_stop_delete_test.go:142: failed waiting for 'addon dashboard' pod post-stop-start: k8s-app=kubernetes-dashboard within 4m0s: timed out waiting for the condition

Bug:

	X startup failed: Wait failed: waiting for apps_running: waitings for k8s app running: missing components: kube-dns
  • TestStartStop/group/embed-certs - 299.
    Issue:
    Bug:
Failed to setup certs: certificate symlinks: calculate hash for cacert /usr/share/ca-certificates/5573.pem: cert:

Hyperkit

old-docker

new seen issue, created an issue for it #7533

https://storage.googleapis.com/minikube-builds/logs/7490/70329bf/HyperKit_macOS.html#fail_TestStartStop%2fgroup%2fold-docker

Error response from daemon: Cannot pause container 7d545e9bc7891bc76834242c13f4736f2b12dfd36a9fb1128b2622686d09f554: cannot pause a stopped container: unknown

@minikube-pr-bot
Copy link

Times for minikube: [66.463368023 63.993006007 66.274228329]
Average time for minikube: 65.57686745299999

Times for Minikube (PR 7490): [67.73435280499999 66.85752741499999 72.69108813300001]
Average time for Minikube (PR 7490): 69.09432278433333

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7490) |
+--------------------------------+-----------+--------------------+
| * minikube v1.9.2 on Debian    |  0.058249 |           0.057541 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.022584 |           0.021926 |
| on user configuration          |           |                    |
| * Starting control plane node  |  0.003243 |                    |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 40.572107 |          42.573981 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.0 | 22.465008 |          24.223278 |
| on Docker 19.03.8 ...          |           |                    |
| * Enabling addons:             |  2.373826 |           2.126552 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.077048 |           0.083546 |
| configured to use "minikube"   |           |                    |
|                                |  0.004803 |           0.004333 |
+--------------------------------+-----------+--------------------+

@minikube-pr-bot
Copy link

Times for minikube: [65.84141496699999 67.025085095 66.960568721]
Average time for minikube: 66.60902292766666

Times for Minikube (PR 7490): [64.850830954 65.76610339 64.125193439]
Average time for Minikube (PR 7490): 64.91404259433334

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7490) |
+--------------------------------+-----------+--------------------+
| * minikube v1.9.2 on Debian    |  0.052795 |           0.053464 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.019377 |           0.020972 |
| on user configuration          |           |                    |
| * Starting control plane node  |  0.003360 |                    |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 42.180018 |          40.158628 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.0 | 22.195835 |          22.246346 |
| on Docker 19.03.8 ...          |           |                    |
| * Enabling addons:             |  2.067874 |           2.345173 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.086145 |           0.079899 |
| configured to use "minikube"   |           |                    |
|                                |  0.003617 |           0.004138 |
+--------------------------------+-----------+--------------------+

@@ -84,6 +84,19 @@ func DeleteContainer(ociBin string, name string) error {
return nil
}

// PrepareContainerNode sets up the container node befpre CreateContainerNode is caleld
Copy link
Contributor

Choose a reason for hiding this comment

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

Check spellings

@minikube-pr-bot
Copy link

Times for minikube: [66.443212253 65.529856186 67.720592094]
Average time for minikube: 66.56455351099999

Times for Minikube (PR 7490): [66.39431468500001 68.26888306800001 68.79210714]
Average time for Minikube (PR 7490): 67.81843496433333

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7490) |
+--------------------------------+-----------+--------------------+
| * minikube v1.9.2 on Debian    |  0.053980 |           0.055041 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.020513 |           0.022414 |
| on user configuration          |           |                    |
| * Starting control plane node  |  0.003531 |                    |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 41.916657 |          41.125226 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.0 | 22.301452 |          24.308552 |
| on Docker 19.03.8 ...          |           |                    |
| * Enabling addons:             |  2.177498 |           2.217001 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.088008 |           0.080959 |
| configured to use "minikube"   |           |                    |
|                                |  0.002915 |           0.003341 |
+--------------------------------+-----------+--------------------+

@minikube-pr-bot
Copy link

Times for minikube: [66.903358719 66.50266573399999 64.877308167]
Average time for minikube: 66.09444420666667

Times for Minikube (PR 7490): [64.17831082100001 63.608446279 65.191711819]
Average time for Minikube (PR 7490): 64.32615630633333

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7490) |
+--------------------------------+-----------+--------------------+
| * minikube v1.9.2 on Debian    |  0.053837 |           0.053925 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.020096 |           0.020840 |
| on user configuration          |           |                    |
| * Starting control plane node  |  0.004032 |                    |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 40.592927 |          40.705239 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.0 | 23.125235 |          21.118722 |
| on Docker 19.03.8 ...          |           |                    |
| * Enabling addons:             |  2.205930 |           2.330425 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.088571 |           0.089433 |
| configured to use "minikube"   |           |                    |
|                                |  0.003816 |           0.003543 |
+--------------------------------+-----------+--------------------+

@minikube-pr-bot
Copy link

Times for minikube: [65.915732116 65.501339117 65.786926499]
Average time for minikube: 65.73466591066666

Times for Minikube (PR 7490): [70.707164978 67.18412895399999 67.378430807]
Average time for Minikube (PR 7490): 68.42324157966667

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7490) |
+--------------------------------+-----------+--------------------+
| * minikube v1.9.2 on Debian    |  0.054538 |           0.054101 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.020527 |           0.020157 |
| on user configuration          |           |                    |
| * Starting control plane node  |  0.003081 |                    |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 41.326323 |          41.015895 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.0 | 22.227525 |          24.932760 |
| on Docker 19.03.8 ...          |           |                    |
| * Enabling addons:             |  2.015468 |           2.305820 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.082467 |           0.085287 |
| configured to use "minikube"   |           |                    |
|                                |  0.004738 |           0.003507 |
+--------------------------------+-----------+--------------------+

@medyagh medyagh merged commit f122483 into kubernetes:master Apr 9, 2020
@minikube-pr-bot
Copy link

Times for minikube: [65.746998432 65.71110493200001 71.805386753]
Average time for minikube: 67.75449670566667

Times for Minikube (PR 7490): [66.675511793 65.60625499999999 63.261747055]
Average time for Minikube (PR 7490): 65.18117128266665

Averages Time Per Log

+--------------------------------+-----------+--------------------+
|              LOG               | MINIKUBE  | MINIKUBE (PR 7490) |
+--------------------------------+-----------+--------------------+
| * minikube v1.9.2 on Debian    |  0.055525 |           0.054513 |
|                           9.11 |           |                    |
| * Using the kvm2 driver based  |  0.020234 |           0.021064 |
| on user configuration          |           |                    |
| * Starting control plane node  |  0.003965 |                    |
| minikube in cluster minikube   |           |                    |
| * Creating kvm2 VM (CPUs=2,    | 42.457478 |          40.479509 |
| Memory=3700MB, Disk=20000MB)   |           |                    |
| ...                            |           |                    |
| * Preparing Kubernetes v1.18.0 | 23.180082 |          22.356210 |
| on Docker 19.03.8 ...          |           |                    |
| * Enabling addons:             |  1.948491 |           2.184476 |
| default-storageclass,          |           |                    |
| storage-provisioner            |           |                    |
| * Done! kubectl is now         |  0.085706 |           0.077141 |
| configured to use "minikube"   |           |                    |
|                                |  0.003017 |           0.003093 |
+--------------------------------+-----------+--------------------+

@priyawadhwa priyawadhwa deleted the smarter-extract branch April 9, 2020 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants