Skip to content

Comment on Show HN: Kern – container and resource runtime in a 1.5 MB binary, no daemonparent

Comments

The meaning of un‑cached can vary. The two un‑cached answers are very different. I will give both.

When the image has already been pulled the container takes 3.7 milliseconds. Adding a command does not add any time. I ran /bin/sh -c 'echo hi' inside an alpine image. Over 100 runs the time was 3.73 milliseconds. Running /bin/ in the container gave 3.71 milliseconds. Python is a number because it is CPython that is starting not the isolation. Running python3 -c 'print(1)' inside a python:3.12-slim container takes 15.6 milliseconds. Twelve milliseconds of that time is spent starting the interpreter. The same delay exists on metal.

If the image is not, in the cache then pulling the image dominates the time. Pulling is limited by the network not by runtime. On my connection pulling alpine took 2.7 seconds. Pulling python:3.12-slim took 9.0 seconds for 41 megabytes of layers. This happens once; after the image is cached the times above apply again. The command 'kern pull' pulls the image in advance if you want to pick when this happens.

I measured these times on the desktop described in the README. The system has an i7‑14700KF processor running Linux 7.0.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.