======= 2016-04-14 - docker networking performance ======= {{ :blog:2016:04:14:docker_logo.png?600|docker logo}} today [[http://szborows.blogspot.co.at|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: * loopback interface (as a reference point) * docker container started with own networking (default) * docker container started with host's networking (//--net=host// option) 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. ;)