r/ProgrammerHumor • • Sep 05 '26

Meme memorySafeDocker

Post image
4.2k Upvotes

278 comments sorted by

View all comments

Show parent comment

552

u/Cephell Sep 05 '26

Not him, but I just booted an nginx container just to check and it consumes 81M of ram.

321

u/CWRau Sep 05 '26

Excuse me, what?

I just launched a container with podman and the whole thing + the management overhead takes 13.3M

Is docker that inefficient?

234

u/Cephell Sep 05 '26

I'm also using podman, check what the podman process uses, not what podman reports.

64

u/CWRau Sep 05 '26
● libpod-94883adacea4d25dda1f7301e642b6299522d99aab2820b33feefb72f97a061a.scope - libcrun container
     Loaded: loaded (/run/user/1000/systemd/transient/libpod-94883adacea4d25dda1f7301e642b6299522d99aab2820b33feefb72f97a061a.scope; transient)
  Transient: yes
     Active: active (running) since Sat 2026-09-05 12:49:20 CEST; 1min 41s ago
 Invocation: a659e45e2b974dd290ae61a4f9021245
         IO: 0B read, 0B written
      Tasks: 17 (limit: 2048)
     Memory: 13M (peak: 15.6M)
        CPU: 0
     CGroup: /user.slice/user-1000.slice/user@1000.service/user.slice/libpod-94883adacea4d25dda1f7301e642b6299522d99aab2820b33feefb72f97a061a.scope
             └─container
               ├─4101341 "nginx: master process nginx -g daemon off;"
               ├─4101366 "nginx: worker process"
               ├─4101367 "nginx: worker process"
               ├─4101368 "nginx: worker process"
               ├─4101369 "nginx: worker process"
               ├─4101370 "nginx: worker process"
               ├─4101371 "nginx: worker process"
               ├─4101372 "nginx: worker process"
               ├─4101373 "nginx: worker process"
               ├─4101374 "nginx: worker process"
               ├─4101375 "nginx: worker process"
               ├─4101376 "nginx: worker process"
               ├─4101377 "nginx: worker process"
               ├─4101378 "nginx: worker process"
               ├─4101379 "nginx: worker process"
               ├─4101380 "nginx: worker process"
               └─4101382 "nginx: worker process"

Sep 05 12:49:20 steve systemd[966]: Started libcrun container.

What more do you think is running? 🤔

62

u/Impact321 Sep 05 '26 edited Sep 05 '26

Result of podman run -d nginx

  VIRT    RES    SHR    USS   SWAP    PSS   USED  %CPU  %MEM COMMAND
   9.7m   2.3m   2.0m   1.0m   0.0m   1.1m   2.3m   0.0   0.3  - /usr/bin/conmon --api-version 1 -c 7551f1cfc7faf3e5aa66d86...
  14.6m   9.0m   7.4m   5.9m   0.0m   7.4m   9.0m   0.0   1.4      - nginx: master process nginx -g daemon off;
  15.1m   3.7m   1.7m   0.6m   0.0m   2.2m   3.7m   0.0   0.6          - nginx: worker process

1

u/toadi Sep 10 '26

Have hard memory stops to restart my podman services. Have several that have memory leaks ;)

80

u/Several-Customer7048 Sep 05 '26 • Heartwarming

I launched a container with Maersk and they delivered that joint rusty and crated. 10/10 on the oblong supposed. Old be a vibe hasn’t

14

u/ktannenberg Sep 05 '26

On Win11 using WSL2 backend (I expect same results on Hyper-V backend directly; haven't tried new VMM backend yet) freshly launched nginx:latest is sitting at around 24-25 MiB on average across 40 containers. On Debian 12 they are around 13-14 MiB each.

1

u/Own_Ad9365 Sep 06 '26

What? I thought docker had zero memory overhead

2

u/Impact321 Sep 06 '26

With docker you usually have some management daemons such as dockerd and containerd and shims and such. Take a look at top -cem and press V for forest/tree view.

9

u/creeper6530 Sep 05 '26

Try a lightweight image like Alpine maybe?

2

u/cheezzy4ever Sep 06 '26

For context, how much is it on Windows and Mac?

1

u/penta-network Sep 08 '26 edited Sep 08 '26

In Dozzle it says my nginx containers only use 10.4 to 12.8MB, is that number inaccurate?

Edit: I'm using the alpine image, that's probably the reason

-75

u/After_Persimmon8536 Sep 05 '26

HOLY SHIT CALL THE ARMY NAVY NATIONAL GUARD 81 FUKKIN MB OF RAM HOLY FUCKING SHIT FUCK FUCK FUCK.

Maybe have more than 128MB of RAM?

77

u/Aswesk Sep 05 '26

It adds up when running many, what are you on haha

-40

u/Bubbly_Address_8975 Sep 05 '26 edited Sep 05 '26

Maybe, but even a browser tab eats more ram than that...

EDIT: to put it into perspective guys... how many docker containers you all spawn? I cannot imagine that people here spawn on average more docker containers than browser tabs...

EDIT2: Okay sorry, seems like people spawn more docker containers than browser tabs and are super upset with my comment ^^

→ More replies (15)

30

u/ThunderousHazard Sep 05 '26

Are you sure you have the knowledge required to comment on this? How much RAM do you think is needed for that? My LXC debian instance for NGINX + OpenVPN + Firewall is even less, ~40MB.

→ More replies (7)

27

u/No_Independence3338 Sep 05 '26

This exact mindset is the reason we are getting crappy slow software.

→ More replies (1)

18

u/tristam92 Sep 05 '26

this is why modern software is inefficient shit…

3

u/Porntra420 Sep 05 '26

Have you heard of the concept of addition? Let me explain it to you, number plus number equals bigger number.

Now, onto containers, what's one reason people like them? It lets them more easily deploy and run multiple services on one machine.

Do you see why your comment is stupid yet?

→ More replies (1)