feat: benchmark script comparing Krane with Docker Desktop #32

Merged
jfro merged 1 commit from feat/bench-vs-docker-desktop into main 2026-12-02 02:18:47 +00:00
Owner

Adds scripts/bench.py, which compares Krane on the host's Docker Engine with Docker Desktop for Linux on the same machine, and a README section on running it.

Same engine underneath, but Docker Desktop runs dockerd in a QEMU/KVM VM beside an Electron UI. So it measures:

  • startup: launch to engine answering and window showing; host memory taken
  • idle / loaded: CPU and memory (PSS) of the app and of its engine, with 0 and 50 containers
  • workloads: docker run --rm and exec latency, bind-mount I/O, published-port download, docker build

Each target runs with the other stopped. Docker Desktop is restarted at the end if it was running, and the docker context is put back, since starting Docker Desktop switches it to desktop-linux. Stdlib Python only. Results go to bench-results/ (gitignored).

First results (my VM: 2 vCPUs, 6 GiB, Docker Desktop 4.101 at 2 GiB / 2 CPUs; full defaults)

Host: upper-wolfjaw · x86_64 · 2 CPUs · 5.8 GiB · kernel 6.12.118+deb13-cloud-amd64. Memory is pss; CPU is percent of one core.

  • krane: engine 29.9.1 on Debian GNU/Linux 13 (trixie), 2 CPUs, 5932 MiB
  • docker-desktop: engine 29.10.1 on Docker Desktop, 2 CPUs, 1964 MiB
krane docker-desktop
Startup: engine ready (s) 0.2723 20.6849
Startup: window shown (s) 0.478 20.7016
Startup: host memory taken (MiB) 81.5 953.7
Idle: app memory (MiB) 150.6 643
Idle: engine memory (MiB) 192.4 619.1
Idle: total memory (MiB) 343 1262.1
Idle: app CPU (% of a core) 0.99 0.36
Idle: engine CPU (% of a core) 6.51 3.75
Loaded: total memory (MiB) 763.1 1739.4
Loaded: app CPU (% of a core) 0.94 0.26
Loaded: engine CPU (% of a core) 17.64 22.11
docker run --rm (s, median) 0.3215 0.3916
docker exec (s, median) 0.0604 0.094
Bind mount write (MiB/s) 419.672 376.471
Bind mount read, warm host cache (MiB/s) 8533.33 1600
Bind mount create small files (s) 0.06 4.08
Bind mount scan small files (s) 0.02 0.27
Published port download (MiB/s) 3568.19 56.2553
docker build (s) 3.2097 6.6306

Docker Desktop's engine 29.10.1 vs native 29.9.1. VM numbers, so treat them as indicative; real-hardware runs will differ.

Worth a follow-up

With Krane open, dockerd + containerd use about 6.5% of a core with 5 unrelated containers running (about 0.2% with Krane closed). That's the per-container streaming stats from #11. Tray-only Krane still adds about 3%. Possibly: stream stats only while the window is visible.

Adds `scripts/bench.py`, which compares Krane on the host's Docker Engine with Docker Desktop for Linux on the same machine, and a README section on running it. Same engine underneath, but Docker Desktop runs dockerd in a QEMU/KVM VM beside an Electron UI. So it measures: - **startup**: launch to engine answering and window showing; host memory taken - **idle / loaded**: CPU and memory (PSS) of the app and of its engine, with 0 and 50 containers - **workloads**: `docker run --rm` and `exec` latency, bind-mount I/O, published-port download, `docker build` Each target runs with the other stopped. Docker Desktop is restarted at the end if it was running, and the docker context is put back, since starting Docker Desktop switches it to `desktop-linux`. Stdlib Python only. Results go to `bench-results/` (gitignored). ### First results (my VM: 2 vCPUs, 6 GiB, Docker Desktop 4.101 at 2 GiB / 2 CPUs; full defaults) Host: upper-wolfjaw · x86_64 · 2 CPUs · 5.8 GiB · kernel 6.12.118+deb13-cloud-amd64. Memory is pss; CPU is percent of one core. - **krane**: engine 29.9.1 on Debian GNU/Linux 13 (trixie), 2 CPUs, 5932 MiB - **docker-desktop**: engine 29.10.1 on Docker Desktop, 2 CPUs, 1964 MiB | | krane | docker-desktop | | --- | --- | --- | | Startup: engine ready (s) | 0.2723 | 20.6849 | | Startup: window shown (s) | 0.478 | 20.7016 | | Startup: host memory taken (MiB) | 81.5 | 953.7 | | Idle: app memory (MiB) | 150.6 | 643 | | Idle: engine memory (MiB) | 192.4 | 619.1 | | Idle: total memory (MiB) | 343 | 1262.1 | | Idle: app CPU (% of a core) | 0.99 | 0.36 | | Idle: engine CPU (% of a core) | 6.51 | 3.75 | | Loaded: total memory (MiB) | 763.1 | 1739.4 | | Loaded: app CPU (% of a core) | 0.94 | 0.26 | | Loaded: engine CPU (% of a core) | 17.64 | 22.11 | | docker run --rm (s, median) | 0.3215 | 0.3916 | | docker exec (s, median) | 0.0604 | 0.094 | | Bind mount write (MiB/s) | 419.672 | 376.471 | | Bind mount read, warm host cache (MiB/s) | 8533.33 | 1600 | | Bind mount create small files (s) | 0.06 | 4.08 | | Bind mount scan small files (s) | 0.02 | 0.27 | | Published port download (MiB/s) | 3568.19 | 56.2553 | | docker build (s) | 3.2097 | 6.6306 | Docker Desktop's engine 29.10.1 vs native 29.9.1. VM numbers, so treat them as indicative; real-hardware runs will differ. ### Worth a follow-up With Krane open, dockerd + containerd use about 6.5% of a core with 5 unrelated containers running (about 0.2% with Krane closed). That's the per-container streaming stats from #11. Tray-only Krane still adds about 3%. Possibly: stream stats only while the window is visible.
feat: benchmark script comparing Krane with Docker Desktop
All checks were successful
CI / test (pull_request) Successful in 5m11s
7fd78a6b98
scripts/bench.py measures Krane on the host's engine against Docker
Desktop for Linux: startup, idle and loaded CPU/memory (PSS) of each app
and its engine, and engine workloads (run/exec latency, bind-mount I/O,
published-port download, build). Results go to bench-results/.
jfro merged commit 3430f3fd0d into main 2026-12-02 02:18:47 +00:00
jfro deleted branch feat/bench-vs-docker-desktop 2026-12-02 02:24:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jfro/krane!32
No description provided.