Here are some results of testing performance of different Docker Inter Container Communication (ICC) techniques.
Techniques I tested:
|iptables||Routing settings that give containers externally visible IP address as described here: blog.codeaholics.org/2013/giving-dockerlxc-containers-a-routable-ip-address/|
|pipework||github.com/jpetazzo/pipework – a tool for assigning external IP addresses to containers. It has two modes: using macvlan interface and using veth pairs. I used the second one – veth pairs.|
|Docker link||Docker feature for inter container communication (ICC). It doesn’t assign containers external IPs. docs.docker.com/userguide/dockerlinks/|
Used version 2.1.0 with kernel support.
Tested on Dell Poweredge D320 server with Xeon 1.8GHz, 4GB (1333MHz) RDIMM, 7200RPM SATA HDD
OS Ubuntu server 12.04.4 LTS
Docker version 0.11.
Network performance was tested with iperf with the following client command:
iperf -c $ServerIP -P 1 -i 1 -p 5001 -f g -t 5
Performance in Gbit/s, average for one container.
The following 3 setups was tested:
- One server container and multiple client containers with 1 iperf process in each container.
- Multiple servers and multiple clients. 1 iperf process in each container.
- One server container with one iperf server, multiple containers with multiple iperf clients in each container.
One server and multiple clients
ICC performance between one container with one iperf server and multiple containers with one iperf client each. Average performance per container in Gbit/s.
Multiple servers and multiple clients
ICC between multiple containers each with one iperf server inside, and multiple containers with one iperf client each. Client number i connects to the server number i (mod n), where n is the number of servers.
Below are the average performance results in Gbit/s.
Multiple servers and multiple clients with 1 iperf process inside.
One server and multiple containers with multiple iperf clients inside
Average performance per container in Gbit/sec.
Number of containers x number of iperf clients in one container
|1 x 1||1 x 2||1 x 4||1 x 16||2 x 1||4 x 1||16 x 1||2 x 2||4 x 4||16 x 16|
Running iperf clients in different containers gives better performance compared with the same number of clients running in one container (compare 1×4 and 4×1).