<?xml version="1.0" encoding="UTF-8"?>
<!-- name="generator" content="pyblosxom/1.4.1 7/27/2007" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
<channel>
<title>Блогчетање  Sep 2026</title>
<link>https://danilo.segan.org/blog</link>
<description>Данилово блогче</description>
<language>en</language>
<item>
  <title>How much memory overhead does your Docker container really have?</title>
  <link>https://danilo.segan.org/blog/razvoj/docker-memory-usage</link>
  <description><![CDATA[

<p>TL/DR:</p>
<ul>
  <li>Each container had around 7.4MiB of host memory overhead for Docker shim and proxy services.</li>
  <li>Binding only IPv4 port got that down to 6.2MiB per container by running half the proxies.</li>
  <li>Configuring Docker with <code>userland-proxy: false</code> avoids the proxy altogether and gets overhead down to 4.3MiB</li>
  <li>Memory usage between Ubuntu and Alpine was mostly the same other than a few exceptions.</li>
  <li>Rust (1MiB) beats Go (1.5MiB), with Python in the middle (9.4/10.9MiB), followed by TypeScript (~15MiB) and C# last (18.5MiB).</li>
  <li>Measuring after 200 requests and 15s of settling afterwards, keeps the order but TypeScript and C# fall further behind: Rust (1MiB), Go (3/5MiB), Python (9.7-11MiB), TypeScript (20/26MiB) and finally C# (30/31MiB).</li>
  <li>dockerd at ~70MiB and containerd at ~50MiB were relatively stable between runs.</li>
  <li>Ubuntu surprisingly beat Alpine variants in Go (2.9MiB vs 4.9MiB) and Python (9.7MiB vs 11.1MiB) while losing in TypeScript (26.2MiB vs 20.1MiB).</li>
</ul>

<h2>Scope</h2>
<p>
  I was looking to understand overhead of using Docker to run simple network services (basic "Hello World" API service) in different language runtimes and using different base OSes (Alpine Linux and Ubuntu 26.04), and any simple systemic options to optimize that a bit.
</p>
<p>
  The five languages I wanted to compare were Go, Rust, TypeScript, Python and C#.
</p>

<h2>Methodology</h2>
<p>
  The benchmark was really simple: a basic API handler returning "Hello World" string using whatever the Claude Code/Codex thought made sense as the simplest web framework for the language: Tokio for Rust, ThreadingHTTPServer for Python, node:http for TypeScript, net/http for GoLang and WebApplication for C#.  This is not representative of production loads and is mostly to understand the overhead before you start adding actual business logic inside.
</p>

<p>
  Early on, Claude Code mentioned 2 proxy processes for each container: one to bind to IPv4 port, and another to bind to IPv6 port.  This made me check: in the idle state (containers stopped and then restarted), baseline memory usage was around 7.4MiB when both IPv4 and IPv6 were proxied, and 6.2MiB with just IPv4 (down by about 1.2MiBper container).  From there on, I focused on running with only IPv4 assuming you can always choose which one you prefer for your internal docker communication.
</p>

<p>
  For every run of the benchmarks, I'd stop the docker services (docker compose stop), restart them and only then run the benchmark script with sudo to collect PSS data as RSS was double-counting.  Claude Code and OpenAI Codex both contributed to the benchmark scripts which are pushed to <a href="https://github.com/dsegan/docker-memory-overhead">git@github.com:dsegan/docker-memory-overhead.git</a>.
</p>

<p>
  To gather idle data, I did <code>sudo scripts/report.sh report --requests 0 --settle 15 --samples 1</code>, and for warm data I did <code>sudo scripts/report.sh report --requests 200 --settle 15 --samples 5</code>.
</p>

<h2>Idle Results for both IPv4 and IPv6 being served</h2>

<!--
| service           | current |   WS | anon | file | kernel | swap | peak | tasks | host tax | estimate | endpoint |
|:------------------|--------:|-----:|-----:|-----:|-------:|-----:|-----:|------:|---------:|---------:|:---------|
| csharp-alpine     |    18.1 | 18.1 |  8.4 |  7.9 |    1.6 |  0.0 | 18.5 |    22 |      7.4 |     25.5 | ok       |
| csharp-ubuntu     |    18.5 | 18.5 |  8.9 |  7.9 |    1.8 |  0.0 | 19.3 |    22 |      7.4 |     25.9 | ok       |
| go-alpine         |     1.6 |  1.6 |  1.1 |  0.0 |    0.5 |  0.0 |  4.9 |     5 |      7.3 |      8.9 | ok       |
| go-ubuntu         |     1.6 |  1.6 |  1.2 |  0.0 |    0.5 |  0.0 |  4.7 |     5 |      7.6 |      9.2 | ok       |
| python-alpine     |    10.9 | 10.9 | 10.4 |  0.0 |    0.5 |  0.0 | 13.5 |     1 |      7.4 |     18.3 | ok       |
| python-ubuntu     |     9.4 |  9.4 |  8.8 |  0.0 |    0.6 |  0.0 | 10.1 |     1 |      7.7 |     17.1 | ok       |
| rust-alpine       |     0.8 |  0.8 |  0.2 |  0.0 |    0.6 |  0.0 |  5.2 |     9 |      7.4 |      8.1 | ok       |
| rust-ubuntu       |     1.0 |  1.0 |  0.4 |  0.0 |    0.6 |  0.0 |  5.2 |     9 |      7.4 |      8.4 | ok       |
| typescript-alpine |    13.0 | 13.0 | 11.9 |  0.0 |    1.1 |  0.0 | 16.7 |     7 |      7.3 |     20.3 | ok       |
| typescript-ubuntu |    17.6 | 17.6 | 16.4 |  0.0 |    1.2 |  0.0 | 21.8 |     7 |      7.4 |     25.1 | ok       |
  -->

<table>
  <thead>
    <tr>
      <th>service</th><th>current</th><th>WS</th><th>anon</th>
      <th>file</th><th>kernel</th><th>swap</th><th>peak</th>
      <th>tasks</th><th>host tax</th><th>estimate</th><th>endpoint</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>csharp-alpine</td><td>18.1</td><td>18.1</td><td>8.4</td>
      <td>7.9</td><td>1.6</td><td>0.0</td><td>18.5</td>
      <td>22</td><td>7.4</td><td>25.5</td><td>ok</td>
    </tr>
    <tr>
      <td>csharp-ubuntu</td><td>18.5</td><td>18.5</td><td>8.9</td>
      <td>7.9</td><td>1.8</td><td>0.0</td><td>19.3</td>
      <td>22</td><td>7.4</td><td>25.9</td><td>ok</td>
    </tr>
    <tr>
      <td>go-alpine</td><td>1.6</td><td>1.6</td><td>1.1</td>
      <td>0.0</td><td>0.5</td><td>0.0</td><td>4.9</td>
      <td>5</td><td>7.3</td><td>8.9</td><td>ok</td>
    </tr>
    <tr>
      <td>go-ubuntu</td><td>1.6</td><td>1.6</td><td>1.2</td>
      <td>0.0</td><td>0.5</td><td>0.0</td><td>4.7</td>
      <td>5</td><td>7.6</td><td>9.2</td><td>ok</td>
    </tr>
    <tr>
      <td>python-alpine</td><td>10.9</td><td>10.9</td><td>10.4</td>
      <td>0.0</td><td>0.5</td><td>0.0</td><td>13.5</td>
      <td>1</td><td>7.4</td><td>18.3</td><td>ok</td>
    </tr>
    <tr>
      <td>python-ubuntu</td><td>9.4</td><td>9.4</td><td>8.8</td>
      <td>0.0</td><td>0.6</td><td>0.0</td><td>10.1</td>
      <td>1</td><td>7.7</td><td>17.1</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-alpine</td><td>0.8</td><td>0.8</td><td>0.2</td>
      <td>0.0</td><td>0.6</td><td>0.0</td><td>5.2</td>
      <td>9</td><td>7.4</td><td>8.1</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-ubuntu</td><td>1.0</td><td>1.0</td><td>0.4</td>
      <td>0.0</td><td>0.6</td><td>0.0</td><td>5.2</td>
      <td>9</td><td>7.4</td><td>8.4</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-alpine</td><td>13.0</td><td>13.0</td><td>11.9</td>
      <td>0.0</td><td>1.1</td><td>0.0</td><td>16.7</td>
      <td>7</td><td>7.3</td><td>20.3</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-ubuntu</td><td>17.6</td><td>17.6</td><td>16.4</td>
      <td>0.0</td><td>1.2</td><td>0.0</td><td>21.8</td>
      <td>7</td><td>7.4</td><td>25.1</td><td>ok</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th scope="row">Sum</th><td>92.5</td><td>92.5</td><td>67.7</td>
      <td>15.8</td><td>9.0</td><td>0.0</td><td>119.9</td>
      <td>88</td><td>74.3</td><td>166.8</td><td>10/10 ok</td>
    </tr>
  </tfoot>
</table>


<h2>Idle Results with just IPv4</h2>

<!--
| service           | current |   WS | anon | file | kernel | swap | peak | tasks | host tax | estimate | endpoint |
|:------------------|--------:|-----:|-----:|-----:|-------:|-----:|-----:|------:|---------:|---------:|:---------|
| csharp-alpine     |    21.3 | 18.5 |  8.4 | 10.9 |    1.6 |  0.0 | 21.6 |    22 |      6.0 |     24.5 | ok       |
| csharp-ubuntu     |    21.9 | 18.7 |  8.8 | 11.3 |    1.8 |  0.0 | 22.5 |    23 |      6.3 |     25.0 | ok       |
| go-alpine         |     3.7 |  1.5 |  1.0 |  2.2 |    0.5 |  0.0 |  5.4 |     5 |      6.4 |      7.9 | ok       |
| go-ubuntu         |     1.7 |  1.6 |  1.1 |  0.1 |    0.5 |  0.0 |  4.7 |     5 |      6.0 |      7.6 | ok       |
| python-alpine     |    12.3 | 10.9 | 10.4 |  1.3 |    0.5 |  0.0 | 14.7 |     1 |      6.3 |     17.2 | ok       |
| python-ubuntu     |    10.6 |  9.4 |  8.8 |  1.1 |    0.6 |  0.0 | 11.7 |     1 |      6.4 |     15.8 | ok       |
| rust-alpine       |     0.8 |  0.8 |  0.2 |  0.0 |    0.6 |  0.0 |  5.5 |     9 |      6.2 |      7.0 | ok       |
| rust-ubuntu       |     1.1 |  1.0 |  0.4 |  0.1 |    0.6 |  0.0 |  5.4 |     9 |      6.1 |      7.1 | ok       |
| typescript-alpine |    14.7 | 13.1 | 11.9 |  1.6 |    1.2 |  0.0 | 17.8 |     7 |      6.3 |     19.4 | ok       |
| typescript-ubuntu |    19.2 | 17.7 | 16.4 |  1.5 |    1.2 |  0.0 | 23.2 |     7 |      6.3 |     23.9 | ok       |
  -->

<table>
  <thead>
    <tr>
      <th>service</th><th>current</th><th>WS</th><th>anon</th>
      <th>file</th><th>kernel</th><th>swap</th><th>peak</th>
      <th>tasks</th><th>host tax</th><th>estimate</th><th>endpoint</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>csharp-alpine</td><td>21.3</td><td>18.5</td><td>8.4</td>
      <td>10.9</td><td>1.6</td><td>0.0</td><td>21.6</td>
      <td>22</td><td>6.0</td><td>24.5</td><td>ok</td>
    </tr>
    <tr>
      <td>csharp-ubuntu</td><td>21.9</td><td>18.7</td><td>8.8</td>
      <td>11.3</td><td>1.8</td><td>0.0</td><td>22.5</td>
      <td>23</td><td>6.3</td><td>25.0</td><td>ok</td>
    </tr>
    <tr>
      <td>go-alpine</td><td>3.7</td><td>1.5</td><td>1.0</td>
      <td>2.2</td><td>0.5</td><td>0.0</td><td>5.4</td>
      <td>5</td><td>6.4</td><td>7.9</td><td>ok</td>
    </tr>
    <tr>
      <td>go-ubuntu</td><td>1.7</td><td>1.6</td><td>1.1</td>
      <td>0.1</td><td>0.5</td><td>0.0</td><td>4.7</td>
      <td>5</td><td>6.0</td><td>7.6</td><td>ok</td>
    </tr>
    <tr>
      <td>python-alpine</td><td>12.3</td><td>10.9</td><td>10.4</td>
      <td>1.3</td><td>0.5</td><td>0.0</td><td>14.7</td>
      <td>1</td><td>6.3</td><td>17.2</td><td>ok</td>
    </tr>
    <tr>
      <td>python-ubuntu</td><td>10.6</td><td>9.4</td><td>8.8</td>
      <td>1.1</td><td>0.6</td><td>0.0</td><td>11.7</td>
      <td>1</td><td>6.4</td><td>15.8</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-alpine</td><td>0.8</td><td>0.8</td><td>0.2</td>
      <td>0.0</td><td>0.6</td><td>0.0</td><td>5.5</td>
      <td>9</td><td>6.2</td><td>7.0</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-ubuntu</td><td>1.1</td><td>1.0</td><td>0.4</td>
      <td>0.1</td><td>0.6</td><td>0.0</td><td>5.4</td>
      <td>9</td><td>6.1</td><td>7.1</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-alpine</td><td>14.7</td><td>13.1</td><td>11.9</td>
      <td>1.6</td><td>1.2</td><td>0.0</td><td>17.8</td>
      <td>7</td><td>6.3</td><td>19.4</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-ubuntu</td><td>19.2</td><td>17.7</td><td>16.4</td>
      <td>1.5</td><td>1.2</td><td>0.0</td><td>23.2</td>
      <td>7</td><td>6.3</td><td>23.9</td><td>ok</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th scope="row">Total</th><td>107.3</td><td>93.2</td><td>67.4</td>
      <td>30.1</td><td>9.1</td><td>0.0</td><td>132.5</td>
      <td>89</td><td>62.3</td><td>155.4</td><td>10/10 ok</td>
    </tr>
  </tfoot>
</table>


<h2>Warm results with both IPv4 and IPv6</h2>

<!--
| service           | current |   WS | anon | file | kernel | swap | peak | tasks | host tax | estimate | endpoint |
|:------------------|--------:|-----:|-----:|-----:|-------:|-----:|-----:|------:|---------:|---------:|:---------|
| csharp-alpine     |    50.5 | 30.1 | 11.1 | 37.3 |    1.9 |  0.0 | 50.9 |    24 |      7.7 |     37.8 | ok       |
| csharp-ubuntu     |    48.7 | 31.5 | 11.6 | 35.1 |    1.9 |  0.0 | 49.2 |    23 |      7.8 |     39.2 | ok       |
| go-alpine         |     4.9 |  4.9 |  2.1 |  2.3 |    0.5 |  0.0 |  6.1 |     6 |      7.7 |     12.7 | ok       |
| go-ubuntu         |     4.9 |  2.9 |  2.1 |  2.3 |    0.5 |  0.0 |  6.2 |     5 |      7.8 |     10.7 | ok       |
| python-alpine     |    17.7 | 11.1 | 10.4 |  6.6 |    0.6 |  0.0 | 20.0 |     1 |      7.8 |     18.9 | ok       |
| python-ubuntu     |    13.9 |  9.7 |  8.9 |  4.3 |    0.7 |  0.0 | 15.6 |     1 |      7.8 |     17.5 | ok       |
| rust-alpine       |     1.3 |  0.9 |  0.2 |  0.5 |    0.6 |  0.0 |  5.1 |     9 |      7.7 |      8.6 | ok       |
| rust-ubuntu       |     1.5 |  1.1 |  0.4 |  0.4 |    0.6 |  0.0 |  5.2 |     9 |      7.7 |      8.8 | ok       |
| typescript-alpine |    44.9 | 20.1 | 14.1 | 29.4 |    1.4 |  0.0 | 47.1 |     7 |      7.9 |     28.0 | ok       |
| typescript-ubuntu |    58.9 | 26.2 | 20.2 | 37.2 |    1.5 |  0.0 | 59.6 |     7 |      8.0 |     34.3 | ok       |
-->
<table>
  <thead>
    <tr>
      <th>service</th><th>current</th><th>WS</th><th>anon</th>
      <th>file</th><th>kernel</th><th>swap</th><th>peak</th>
      <th>tasks</th><th>host tax</th><th>estimate</th><th>endpoint</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>csharp-alpine</td><td>50.5</td><td>30.1</td><td>11.1</td>
      <td>37.3</td><td>1.9</td><td>0.0</td><td>50.9</td>
      <td>24</td><td>7.7</td><td>37.8</td><td>ok</td>
    </tr>
    <tr>
      <td>csharp-ubuntu</td><td>48.7</td><td>31.5</td><td>11.6</td>
      <td>35.1</td><td>1.9</td><td>0.0</td><td>49.2</td>
      <td>23</td><td>7.8</td><td>39.2</td><td>ok</td>
    </tr>
    <tr>
      <td>go-alpine</td><td>4.9</td><td>4.9</td><td>2.1</td>
      <td>2.3</td><td>0.5</td><td>0.0</td><td>6.1</td>
      <td>6</td><td>7.7</td><td>12.7</td><td>ok</td>
    </tr>
    <tr>
      <td>go-ubuntu</td><td>4.9</td><td>2.9</td><td>2.1</td>
      <td>2.3</td><td>0.5</td><td>0.0</td><td>6.2</td>
      <td>5</td><td>7.8</td><td>10.7</td><td>ok</td>
    </tr>
    <tr>
      <td>python-alpine</td><td>17.7</td><td>11.1</td><td>10.4</td>
      <td>6.6</td><td>0.6</td><td>0.0</td><td>20.0</td>
      <td>1</td><td>7.8</td><td>18.9</td><td>ok</td>
    </tr>
    <tr>
      <td>python-ubuntu</td><td>13.9</td><td>9.7</td><td>8.9</td>
      <td>4.3</td><td>0.7</td><td>0.0</td><td>15.6</td>
      <td>1</td><td>7.8</td><td>17.5</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-alpine</td><td>1.3</td><td>0.9</td><td>0.2</td>
      <td>0.5</td><td>0.6</td><td>0.0</td><td>5.1</td>
      <td>9</td><td>7.7</td><td>8.6</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-ubuntu</td><td>1.5</td><td>1.1</td><td>0.4</td>
      <td>0.4</td><td>0.6</td><td>0.0</td><td>5.2</td>
      <td>9</td><td>7.7</td><td>8.8</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-alpine</td><td>44.9</td><td>20.1</td><td>14.1</td>
      <td>29.4</td><td>1.4</td><td>0.0</td><td>47.1</td>
      <td>7</td><td>7.9</td><td>28.0</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-ubuntu</td><td>58.9</td><td>26.2</td><td>20.2</td>
      <td>37.2</td><td>1.5</td><td>0.0</td><td>59.6</td>
      <td>7</td><td>8.0</td><td>34.3</td><td>ok</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th scope="row">Total</th><td>247.2</td><td>138.5</td><td>81.1</td>
      <td>155.4</td><td>10.2</td><td>0.0</td><td>265.0</td>
      <td>92</td><td>77.9</td><td>216.5</td><td>10/10 ok</td>
    </tr>
  </tfoot>
</table>

<h2>Warm results with just IPv4</h2>

<!--
| service           | current |   WS | anon | file | kernel | swap | peak | tasks | host tax | estimate | endpoint |
|:------------------|--------:|-----:|-----:|-----:|-------:|-----:|-----:|------:|---------:|---------:|:---------|
| csharp-alpine     |    38.1 | 25.7 | 11.1 | 24.8 |    1.8 |  0.0 | 43.3 |    24 |      6.5 |     32.2 | ok       |
| csharp-ubuntu     |    39.0 | 25.3 | 12.3 | 24.5 |    1.9 |  0.0 | 45.0 |    24 |      6.3 |     31.6 | ok       |
| go-alpine         |     2.7 |  2.2 |  2.0 |  0.5 |    0.5 |  0.1 |  4.9 |     5 |      6.5 |      8.7 | ok       |
| go-ubuntu         |     3.7 |  2.6 |  2.1 |  1.2 |    0.5 |  0.0 |  5.5 |     5 |      6.3 |      8.8 | ok       |
| python-alpine     |    12.1 | 10.8 | 10.4 |  1.2 |    0.4 |  0.0 | 19.0 |     1 |      6.3 |     17.1 | ok       |
| python-ubuntu     |    10.8 |  9.3 |  8.9 |  1.6 |    0.4 |  0.0 | 14.1 |     1 |      6.4 |     15.6 | ok       |
| rust-alpine       |     1.3 |  0.8 |  0.2 |  0.5 |    0.6 |  0.0 |  5.2 |     9 |      6.2 |      7.0 | ok       |
| rust-ubuntu       |     1.5 |  1.0 |  0.4 |  0.4 |    0.6 |  0.0 |  4.9 |     9 |      6.3 |      7.3 | ok       |
| typescript-alpine |    19.8 | 15.9 | 14.4 |  4.2 |    1.2 |  0.0 | 40.5 |     7 |      6.4 |     22.4 | ok       |
| typescript-ubuntu |    26.2 | 21.6 | 20.1 |  4.8 |    1.3 |  0.0 | 51.8 |     7 |      6.4 |     28.0 | ok       |

  -->
<table>
  <thead>
    <tr>
      <th>service</th><th>current</th><th>WS</th><th>anon</th>
      <th>file</th><th>kernel</th><th>swap</th><th>peak</th>
      <th>tasks</th><th>host tax</th><th>estimate</th><th>endpoint</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>csharp-alpine</td><td>38.1</td><td>25.7</td><td>11.1</td>
      <td>24.8</td><td>1.8</td><td>0.0</td><td>43.3</td>
      <td>24</td><td>6.5</td><td>32.2</td><td>ok</td>
    </tr>
    <tr>
      <td>csharp-ubuntu</td><td>39.0</td><td>25.3</td><td>12.3</td>
      <td>24.5</td><td>1.9</td><td>0.0</td><td>45.0</td>
      <td>24</td><td>6.3</td><td>31.6</td><td>ok</td>
    </tr>
    <tr>
      <td>go-alpine</td><td>2.7</td><td>2.2</td><td>2.0</td>
      <td>0.5</td><td>0.5</td><td>0.1</td><td>4.9</td>
      <td>5</td><td>6.5</td><td>8.7</td><td>ok</td>
    </tr>
    <tr>
      <td>go-ubuntu</td><td>3.7</td><td>2.6</td><td>2.1</td>
      <td>1.2</td><td>0.5</td><td>0.0</td><td>5.5</td>
      <td>5</td><td>6.3</td><td>8.8</td><td>ok</td>
    </tr>
    <tr>
      <td>python-alpine</td><td>12.1</td><td>10.8</td><td>10.4</td>
      <td>1.2</td><td>0.4</td><td>0.0</td><td>19.0</td>
      <td>1</td><td>6.3</td><td>17.1</td><td>ok</td>
    </tr>
    <tr>
      <td>python-ubuntu</td><td>10.8</td><td>9.3</td><td>8.9</td>
      <td>1.6</td><td>0.4</td><td>0.0</td><td>14.1</td>
      <td>1</td><td>6.4</td><td>15.6</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-alpine</td><td>1.3</td><td>0.8</td><td>0.2</td>
      <td>0.5</td><td>0.6</td><td>0.0</td><td>5.2</td>
      <td>9</td><td>6.2</td><td>7.0</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-ubuntu</td><td>1.5</td><td>1.0</td><td>0.4</td>
      <td>0.4</td><td>0.6</td><td>0.0</td><td>4.9</td>
      <td>9</td><td>6.3</td><td>7.3</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-alpine</td><td>19.8</td><td>15.9</td><td>14.4</td>
      <td>4.2</td><td>1.2</td><td>0.0</td><td>40.5</td>
      <td>7</td><td>6.4</td><td>22.4</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-ubuntu</td><td>26.2</td><td>21.6</td><td>20.1</td>
      <td>4.8</td><td>1.3</td><td>0.0</td><td>51.8</td>
      <td>7</td><td>6.4</td><td>28.0</td><td>ok</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th scope="row">Total</th><td>155.2</td><td>115.2</td><td>81.9</td>
      <td>63.7</td><td>9.2</td><td>0.1</td><td>234.2</td>
      <td>92</td><td>63.6</td><td>178.7</td><td>10/10 ok</td>
    </tr>
  </tfoot>
</table>

<h2>userland-proxy: false</h2>

<!--
| service           | current |   WS | anon | file | kernel | swap | peak | tasks | host tax | estimate | endpoint |
|:------------------|--------:|-----:|-----:|-----:|-------:|-----:|-----:|------:|---------:|---------:|:---------|
| csharp-alpine     |    47.1 | 33.9 |  9.2 | 35.8 |    1.7 |  0.0 | 49.1 |    23 |      4.4 |     38.3 | ok       |
| csharp-ubuntu     |    50.6 | 38.4 | 13.6 | 35.2 |    1.8 |  0.0 | 51.3 |    22 |      4.3 |     42.7 | ok       |
| go-alpine         |     4.8 |  3.6 |  2.1 |  2.3 |    0.5 |  0.0 |  6.2 |     5 |      4.3 |      7.9 | ok       |
| go-ubuntu         |     5.1 |  3.8 |  2.3 |  2.3 |    0.5 |  0.0 |  6.1 |     5 |      4.5 |      8.3 | ok       |
| python-alpine     |    17.3 | 12.4 | 10.4 |  6.3 |    0.5 |  0.0 | 19.8 |     1 |      4.3 |     16.7 | ok       |
| python-ubuntu     |    15.4 | 10.9 |  8.9 |  5.9 |    0.6 |  0.0 | 17.3 |     1 |      4.2 |     15.1 | ok       |
| rust-alpine       |     1.3 |  1.1 |  0.2 |  0.5 |    0.6 |  0.0 |  5.1 |     9 |      4.5 |      5.6 | ok       |
| rust-ubuntu       |     1.5 |  1.3 |  0.4 |  0.4 |    0.6 |  0.0 |  5.4 |     9 |      4.3 |      5.6 | ok       |
| typescript-alpine |    44.1 | 19.3 | 14.4 | 28.4 |    1.2 |  0.0 | 46.3 |     7 |      4.5 |     23.8 | ok       |
| typescript-ubuntu |    51.9 | 25.5 | 20.3 | 30.3 |    1.3 |  0.0 | 52.6 |     7 |      4.3 |     29.8 | ok       |
-->
<table>
  <thead>
    <tr>
      <th>service</th><th>current</th><th>WS</th><th>anon</th>
      <th>file</th><th>kernel</th><th>swap</th><th>peak</th>
      <th>tasks</th><th>host tax</th><th>estimate</th><th>endpoint</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>csharp-alpine</td><td>47.1</td><td>33.9</td><td>9.2</td>
      <td>35.8</td><td>1.7</td><td>0.0</td><td>49.1</td>
      <td>23</td><td>4.4</td><td>38.3</td><td>ok</td>
    </tr>
    <tr>
      <td>csharp-ubuntu</td><td>50.6</td><td>38.4</td><td>13.6</td>
      <td>35.2</td><td>1.8</td><td>0.0</td><td>51.3</td>
      <td>22</td><td>4.3</td><td>42.7</td><td>ok</td>
    </tr>
    <tr>
      <td>go-alpine</td><td>4.8</td><td>3.6</td><td>2.1</td>
      <td>2.3</td><td>0.5</td><td>0.0</td><td>6.2</td>
      <td>5</td><td>4.3</td><td>7.9</td><td>ok</td>
    </tr>
    <tr>
      <td>go-ubuntu</td><td>5.1</td><td>3.8</td><td>2.3</td>
      <td>2.3</td><td>0.5</td><td>0.0</td><td>6.1</td>
      <td>5</td><td>4.5</td><td>8.3</td><td>ok</td>
    </tr>
    <tr>
      <td>python-alpine</td><td>17.3</td><td>12.4</td><td>10.4</td>
      <td>6.3</td><td>0.5</td><td>0.0</td><td>19.8</td>
      <td>1</td><td>4.3</td><td>16.7</td><td>ok</td>
    </tr>
    <tr>
      <td>python-ubuntu</td><td>15.4</td><td>10.9</td><td>8.9</td>
      <td>5.9</td><td>0.6</td><td>0.0</td><td>17.3</td>
      <td>1</td><td>4.2</td><td>15.1</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-alpine</td><td>1.3</td><td>1.1</td><td>0.2</td>
      <td>0.5</td><td>0.6</td><td>0.0</td><td>5.1</td>
      <td>9</td><td>4.5</td><td>5.6</td><td>ok</td>
    </tr>
    <tr>
      <td>rust-ubuntu</td><td>1.5</td><td>1.3</td><td>0.4</td>
      <td>0.4</td><td>0.6</td><td>0.0</td><td>5.4</td>
      <td>9</td><td>4.3</td><td>5.6</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-alpine</td><td>44.1</td><td>19.3</td><td>14.4</td>
      <td>28.4</td><td>1.2</td><td>0.0</td><td>46.3</td>
      <td>7</td><td>4.5</td><td>23.8</td><td>ok</td>
    </tr>
    <tr>
      <td>typescript-ubuntu</td><td>51.9</td><td>25.5</td><td>20.3</td>
      <td>30.3</td><td>1.3</td><td>0.0</td><td>52.6</td>
      <td>7</td><td>4.3</td><td>29.8</td><td>ok</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th scope="row">Total</th><td>239.1</td><td>150.2</td><td>81.8</td>
      <td>147.4</td><td>9.3</td><td>0.0</td><td>259.2</td>
      <td>89</td><td>43.6</td><td>193.8</td><td>10/10 ok</td>
    </tr>
  </tfoot>
</table>

<h2>Options & Alternatives</h2>

<p>
  If getting the overhead down is the goal, there are tools which you can leverage which may or may not be suitable:
</p>
<ul>
  <li>Drop the userland-proxy from Docker Daemon.</li>
  <li>Avoid languages which aggressively use up your memory: Rust and Go are clear winners, with a surprising show from Python staying mostly stable, and bad results from NodeJS and C#.</li>
  <li>Podman is daemonless and might avoid the overhead altogether.</li>
  <li>LXD/Incus might be worth exploring, but they provide system containers vs application containers.</li>
  <li>Systemd units with sandboxing (but without filesystem isolation) between services should get the overhead down to zero.</li>
  <li>Snaps to add filesystem isolation to a feature-set similar to systemd units — but not designed for this type of use-case.</li>
  <li>...</li>
</ul>

<h2>Conclusions</h2>
<p>
  Docker is not well suited to running on low-memory platforms as always-running daemons take around 100MiB of memory, on top of 4-6-8MiB of additional memory per container: a system with 20 containers will use up 220MiB of RAM just to orchestrate containers, and that's without any service actually operating.  With 20 Rust or Go services you might just about fit into 256MiB of RAM, but you'll be looking OOMs in the face.  If you are using anything else, 512MiB is going to be low as well.
</p>

<p>
  <strong>Finally, take the above results with a (big) grain of salt: benchmark code has been built by LLMs, and it is not representative of any production loads.</strong>
</p>

]]></description>
</item>

</channel>
</rss>
