<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://baszerr.eu/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>BaSzErr - blog:2016:04:14</title>
        <description></description>
        <link>https://baszerr.eu/</link>
        <lastBuildDate>Tue, 07 Apr 2026 17:18:02 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://baszerr.eu/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>BaSzErr</title>
            <link>https://baszerr.eu/</link>
        </image>
        <item>
            <title>docker_networking_performance</title>
            <link>https://baszerr.eu/doku.php?id=blog:2016:04:14:docker_networking_performance</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;docker_networking_performance&quot;&gt;2016-04-14 - docker networking performance&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://baszerr.eu/lib/exe/detail.php?id=blog%3A2016%3A04%3A14%3Adocker_networking_performance&amp;amp;media=blog:2016:04:14:docker_logo.png&quot; class=&quot;media&quot; title=&quot;blog:2016:04:14:docker_logo.png&quot;&gt;&lt;img src=&quot;https://baszerr.eu/lib/exe/fetch.php?w=600&amp;amp;tok=491c97&amp;amp;media=blog:2016:04:14:docker_logo.png&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;docker logo&quot; alt=&quot;docker logo&quot; width=&quot;600&quot; /&gt;&lt;/a&gt;
today &lt;a href=&quot;http://szborows.blogspot.co.at&quot; class=&quot;urlextern&quot; title=&quot;http://szborows.blogspot.co.at&quot; rel=&quot;ugc nofollow&quot;&gt;Sławek&lt;/a&gt; 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!
&lt;/p&gt;

&lt;p&gt;
the test scenario was simple. on host machine i&amp;#039;ve launched simple application, that generated ~2GB/s of pseudo-random garbage, that was piped though ncat to the other side. other side was:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; loopback interface (as a reference point)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; docker container started with own networking (default)&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; docker container started with host&amp;#039;s networking (&lt;em&gt;–net=host&lt;/em&gt; option)&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
here are the results (average of 4 runs, 10GB transfer each):
&lt;/p&gt;
&lt;div class=&quot;table sectionedit2&quot;&gt;&lt;table class=&quot;inline&quot;&gt;
	&lt;thead&gt;
	&lt;tr class=&quot;row0&quot;&gt;
		&lt;th class=&quot;col0&quot;&gt; test &lt;/th&gt;&lt;th class=&quot;col1&quot;&gt; speed [&lt;abbr title=&quot;Megabyte&quot;&gt;MB&lt;/abbr&gt;/s] &lt;/th&gt;&lt;th class=&quot;col2&quot;&gt; performance loss [%] &lt;/th&gt;
	&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tr class=&quot;row1&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; loopback &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; 707 &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; 0 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row2&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; docker with own networking &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; 385 &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; 45 &lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class=&quot;row3&quot;&gt;
		&lt;td class=&quot;col0&quot;&gt; docker with host networking &lt;/td&gt;&lt;td class=&quot;col1&quot;&gt; 688 &lt;/td&gt;&lt;td class=&quot;col2&quot;&gt; 3 &lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;!-- EDIT{&amp;quot;target&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;name&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;hid&amp;quot;:&amp;quot;table&amp;quot;,&amp;quot;secid&amp;quot;:2,&amp;quot;range&amp;quot;:&amp;quot;749-902&amp;quot;} --&gt;
&lt;p&gt;
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. ;)
&lt;/p&gt;

&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 15 Jun 2021 20:09:23 +0000</pubDate>
        </item>
    </channel>
</rss>
