2016-04-14 - docker networking performance

docker logo today Sławek pointer my attention to the fact, that networking is much slower inside docker containers, than it is on host… and indeed it is – almost by half!

the test scenario was simple. on host machine i've launched simple application, that generated ~2GB/s of pseudo-random garbage, that was piped though ncat to the other side. other side was:

here are the results (average of 4 runs, 10GB transfer each):

test speed [MB/s] performance loss [%]
loopback 707 0
docker with own networking 385 45
docker with host networking 688 3

it is clear now that host network should be used for network-sensitive applications. default (better separation at the cost of performance) is probably good for everything else. ;)