Production-Grade Container Scheduling and Management
Go to file
Kubernetes Submit Queue d7e5bd194a
Merge pull request #57477 from misterikkit/noStrCat
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Avoid string concatenation when comparing pods.

**What this PR does / why we need it**:

Pod comparison in (*NodeInfo).Filter was using GetPodFullName before
comparing pod names. This is a concatenation of pod name and pod
namespace, and it is significantly faster to compare name & namespace
instead.

This is a set of 3 PRs targeting affinity predicate performance. (#57476, #57477, #57478) The key takeaway is approximately 2x speedup in the large affinity benchmark.

The unexpected increase in BenchmarkScheduling/1000Nodes/1000Pods seems to be an outlier, and did not recur on subsequent runs. The benchmarks have a moderate amount of variance to them, and I did not run them enough times to measure mean and standard deviation.

| test | b.N | master | #57476 | #57477 | #57478 | combined |
| ---- | --- | ------ | ------ | ---------- | ---------- | -------- |
| BenchmarkScheduling/100Nodes/0Pods                | 100 |  39629010 ns/op | 36898566 ns/op (-6.89%)   |  38461530 ns/op (-2.95%)  |  36214136 ns/op (-8.62%)  |  43090781 ns/op (+8.74%)  |
| BenchmarkScheduling/100Nodes/1000Pods             | 100 |  85489577 ns/op | 69538016 ns/op (-18.66%)  |  70104254 ns/op (-18.00%) |  75015585 ns/op (-12.25%) |  80986960 ns/op (-5.27%)  |
| BenchmarkScheduling/1000Nodes/0Pods               | 100 | 219356660 ns/op | 200149051 ns/op (-8.76%)  | 192867469 ns/op (-12.08%) | 196896770 ns/op (-10.24%) | 212563662 ns/op (-3.10%)  |
| BenchmarkScheduling/1000Nodes/1000Pods            | 100 | 380368238 ns/op | 381786369 ns/op (+0.37%)  | 387224973 ns/op (+1.80%)  | 417974358 ns/op (+9.89%)  | 411140230 ns/op (+8.09%)  |
| BenchmarkSchedulingAntiAffinity/500Nodes/250Pods  | 250 | 124399176 ns/op | 97568988 ns/op (-21.57%)  | 112027363 ns/op (-9.95%)  | 129134326 ns/op (+3.81%)  |  98607941 ns/op (-20.73%) |
| BenchmarkSchedulingAntiAffinity/500Nodes/5000Pods | 250 | 491677096 ns/op | 441562422 ns/op (-10.19%) | 278127757 ns/op (-43.43%) | 447355609 ns/op (-9.01%)  | 226310721 ns/op (-53.97%) |

Combined performance contains all three patches.
Percentages are relative to master.

Methodology:

I ran the tests on each branch with this command.
```
make test-integration WHAT="./test/integration/scheduler_perf" KUBE_TEST_ARGS="-run=xxxx -bench=."
```

The benchmarks have a fair amount of variance to them, and I did not run them enough times to measure mean and standard deviation.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

The three PRs in this set should collectively fix #54189.

**Special notes for your reviewer**:

**Release note**:

```release-note
Improve scheduler performance of MatchInterPodAffinity predicate.
```
2017-12-21 15:18:55 -08:00
.github
api Merge pull request #56860 from bboreham/patch-3 2017-12-20 11:42:42 -08:00
build Add a version string to pause.c 2017-12-19 09:35:28 +01:00
cluster Merge pull request #57296 from xiangpengzhao/update-coredns-corefile 2017-12-21 09:49:22 -08:00
cmd Merge pull request #57296 from xiangpengzhao/update-coredns-corefile 2017-12-21 09:49:22 -08:00
docs Use k8s.gcr.io vanity domain for container images 2017-12-18 09:18:34 -08:00
examples gcloud docker now auths k8s.gcr.io by default 2017-12-18 09:18:34 -08:00
Godeps Merge pull request #56814 from liztio/update-systemstat 2017-12-19 14:08:41 -08:00
hack Merge pull request #57101 from php-coder/local_up_cluster_daemon_msgs 2017-12-21 11:23:03 -08:00
logo
pkg Merge pull request #57490 from tianshapjq/cleanup-useless-func-pkg/client/conditions/conditions.go 2017-12-21 14:31:16 -08:00
plugin Merge pull request #57477 from misterikkit/noStrCat 2017-12-21 15:18:55 -08:00
staging fix a typo 2017-12-20 13:35:43 +08:00
test Merge pull request #57343 from bskiba/cm-tests-two-containers 2017-12-21 07:34:40 -08:00
third_party
translations
vendor Merge pull request #56814 from liztio/update-systemstat 2017-12-19 14:08:41 -08:00
.bazelrc
.generated_files
.gitattributes
.gitignore
.kazelcfg.json
BUILD.bazel
CHANGELOG-1.2.md
CHANGELOG-1.3.md
CHANGELOG-1.4.md Use k8s.gcr.io vanity domain for container images 2017-12-18 09:18:34 -08:00
CHANGELOG-1.5.md Use k8s.gcr.io vanity domain for container images 2017-12-18 09:18:34 -08:00
CHANGELOG-1.6.md Use k8s.gcr.io vanity domain for container images 2017-12-18 09:18:34 -08:00
CHANGELOG-1.7.md
CHANGELOG-1.8.md Update CHANGELOG-1.8.md for v1.8.6. 2017-12-21 09:50:30 -08:00
CHANGELOG-1.9.md
CHANGELOG-1.10.md Add CHANGELOG-1.10.md for v1.10.0-alpha.1. 2017-12-18 13:41:16 -08:00
CHANGELOG.md
code-of-conduct.md Update code-of-conduct.md 2017-12-20 13:33:36 -05:00
CONTRIBUTING.md
labels.yaml
LICENSE
Makefile
Makefile.generated_files
OWNERS
OWNERS_ALIASES fabiano no longer a thing 2017-12-19 16:37:12 -02:00
README.md
SUPPORT.md
Vagrantfile
WORKSPACE

Kubernetes

Submit Queue Widget GoDoc Widget CII Best Practices


Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale using a system called Borg, combined with best-of-breed ideas and practices from the community.

Kubernetes is hosted by the Cloud Native Computing Foundation (CNCF). If you are a company that wants to help shape the evolution of technologies that are container-packaged, dynamically-scheduled and microservices-oriented, consider joining the CNCF. For details about who's involved and how Kubernetes plays a role, read the CNCF announcement.


To start using Kubernetes

See our documentation on kubernetes.io.

Try our interactive tutorial.

Take a free course on Scalable Microservices with Kubernetes.

To start developing Kubernetes

The community repository hosts all information about building Kubernetes from source, how to contribute code and documentation, who to contact about what, etc.

If you want to build Kubernetes right away there are two options:

You have a working Go environment.
$ go get -d k8s.io/kubernetes
$ cd $GOPATH/src/k8s.io/kubernetes
$ make
You have a working Docker environment.
$ git clone https://github.com/kubernetes/kubernetes
$ cd kubernetes
$ make quick-release

For the full story, head over to the developer's documentation.

Support

If you need support, start with the troubleshooting guide and work your way through the process that we've outlined.

That said, if you have questions, reach out to us one way or another.

Analytics