r/ProgrammerHumor • • Sep 05 '26

Meme memorySafeDocker

Post image
4.2k Upvotes

278 comments sorted by

View all comments

2.0k

u/No_Independence3338 Sep 05 '26

Rewriting won't fix the issue. Docker hogs memory in windows and mac because it needs a separate linux VM so containers can run on top of that.

706

u/Random-num-451284813 Sep 05 '26

So running docker in Linux should fix that right?

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
→ More replies (1)

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

→ More replies (1)

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.

→ More replies (2)
→ More replies (37)

179

u/fujituck Sep 05 '26

No, it runs on windows VM when running in Linux.

100

u/ViktorKozh Sep 05 '26

For the sake of consistent inefficiency.

23

u/just4nothing Sep 05 '26

Do you have a valid windows license for that?

15

u/Random-num-451284813 Sep 05 '26

only if it's windows xp

12

u/ducktape8856 Sep 05 '26

FCKGW-RHQQ2-YXRKT-8TG6W-2B7Q8

Muscle memorised...

→ More replies (1)

53

u/faultydesign Sep 05 '26

Pretty much, containers are native on linux.

87

u/_PM_ME_PANGOLINS_ Sep 05 '26

Containers are native on Windows too, but everyone wants to run Linux containers, not Windows containers.

→ More replies (11)
→ More replies (2)

19

u/_PM_ME_PANGOLINS_ Sep 05 '26

Running containers for the OS you’re running them on fixes the need to have a VM.

→ More replies (2)

22

u/[deleted] Sep 05 '26

[removed] — view removed comment

12

u/ShadF0x Sep 05 '26

use Podman directly

Until you need to run docker-compose and then shit just breaks randomly. Or you have to put the ports into nftables so the podman container can reach outside (even on host's localhost).

I understand why both issues happen, but it's frustrating nonetheless.

→ More replies (4)
→ More replies (8)

48

u/FlipperoniPepperoni Sep 05 '26

And Linux, if you use docker desktop. A remarkably shit piece of software.

38

u/Delicious_Bluejay392 Sep 05 '26

Instances of "<development tool> Desktop GUI version" are usually pretty terrible to use if you already know the few commands you need.

→ More replies (3)

11

u/elreniel2020 Sep 05 '26

Doesn't docker use WSL2 on Windows?

9

u/ShadF0x Sep 05 '26

It does, but it still somehow sucks more than just running something like Debian inside a WSL2 instance directly and launching Docker Engine there.

→ More replies (2)
→ More replies (4)
→ More replies (36)