Skip to content

Instantly share code, notes, and snippets.

@Smana
Last active February 29, 2016 08:28
Show Gist options
  • Save Smana/6cadf377d438c88b5d13 to your computer and use it in GitHub Desktop.
Save Smana/6cadf377d438c88b5d13 to your computer and use it in GitHub Desktop.
Kubernetes network benchmarks
kubernetes network performance tests
========
These are pretty simple benchmarks.
The main purpose is to give an overall comparison between 3 network plugins that we currently support on the project [kubespray.io](http://kubespray.io):
* **Flannel** v0.5.5
* **Weave** v1.4.4
* **Calico** v0.16.1
Feel free to propose different test cases, i'll do my best to add them.
Tests duration : 15 minutes
##Testing plateform
![enter image description here](http://s21.postimg.org/yc6a4pshj/kubernetes_bench_arch.png)
* the kube-proxy is configured with **iptables** mode which performs better.
* the loader server uses the **nodeport** to access to a kubernetes service
## Throughput
This is the simpliest test. We just want to get close to the baremetal performance (e.g. saturate the 10g nic).
the **iperf** client is used from the loader sever with the following options
```
iperf3 -c 10.69.1.45 -p 32105 -t 900 -P 12 -w 32M
```
The iperf server is run within a *pod*.
2 tests are relevant for the throughput:
* **direct**: running the iperf server in order to connect to the node where the pod (iperf server) resides.
e.g. the traffic goes directly to the local pod, no forwarding to another node.
![enter image description here](http://s16.postimg.org/ps0c0h1ed/Throughput_direct.png)
* **forward**: running the iperf client against another node. Therefore there's a forwarding traffic to the where the pod is located.
![enter image description here](http://s21.postimg.org/5isgsq9s7/Throughput_forward_between_nodes.png)
##Requests per second (Nginx)
The replication controller is composed of 2 replicas.
Each nginx replicas is configured with 8 [workers processes](http://nginx.org/en/docs/ngx_core_module.html#worker_processes).
These pods use almost all server's resources where they resides
The http performance tool used is [wrk](https://github.com/wg/wrk) which has multithreading support.
below is the command line used for these tests
```
wrk -c 200 -d 900 -t 2 http://10.69.1.45:32222
```
![enter image description here](http://s27.postimg.org/ssd04p8xv/Nginx_requests_per_seconds.png)
##Conclusion
####Nodes configuration
Hardware : Dell m610 servers
cpu:
memory:
os:
kernel:
kernel settings:
nic:
irqbalance
The kubernetes cluster was deployed with [kubespray.io](http://kubespray.io)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment