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

parallelize updating cluster and setting up certs #7394

Merged
merged 1 commit into from
Apr 3, 2020

Conversation

priyawadhwa
Copy link

Reduces time in setupKubeadm function from 4.6s to 3.2s

slowjam before change: http://104.197.255.167:8000

slowjam after change: http://34.67.230.103:8000

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 3, 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 3, 2020
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, there are few more of these we could do in following up PRs. lets analyse the test results on jenkins

@medyagh
Copy link
Member

medyagh commented Apr 3, 2020

/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 3, 2020
@minikube-pr-bot
Copy link

Error: running mkcmp: exit status 1

@medyagh
Copy link
Member

medyagh commented Apr 3, 2020

The following Docker Driver Failures

TestStartStop/group/containerd - 251.5s

--- needs to verified that is not related to this PR (havne't looked):

TestStartStop/group/crio - 759.66s

TestStartStop/group/embed-certs - 144.29s

TestFunctional/parallel/ComponentHealth

@tstromberg
Copy link
Contributor

This seems good. Looking at SlowJam, SetupCerts still blocks for an additional second:

Screen Shot 2020-04-03 at 9 17 42 AM

If we parallelized the cmd.Copy(f) call in SetupCerts, we might get to where SetupCerts is no longer the blocker.

Here's a bigger idea, that should result in shaving >5s off of the Docker runtime:

  • Update kic_runner to make it possible to re-use a persistent ssh connection rather than docker cp / docker run. See ssh_runner as an example for a persistent client, where we add sessions for each command.

If you compare the slowjam profiles of hyperkit versus docker, you can see the benefit:

SetupCerts:

  • 2.7s on Docker
  • 0.6s on hyperkit

Rough napkin math: Each command or copy on Docker costs at least 0.1 seconds. On ssh it doesn't even show up in the SlowJam graph. I reckon we execute and copy ~60 commands. Thus, I think we should be able to expect 5s in time savings.

@tstromberg
Copy link
Contributor

tstromberg commented Apr 3, 2020

For comparison, SetupCerts on hyperkit. Same code, same machine, different command runner:

Screen Shot 2020-04-03 at 9 57 08 AM

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants