{
  "updated": "2026-11-02",
  "machine": "Apple Silicon Mac (M3 Max), macOS 27.0.1; lifecycle: every engine limited to 2 CPUs and 8 GB",
  "note": "status 'measured' = measured on this machine; 'target' = design budget not yet measured end to end. Container lifecycle = create from alpine, run `true`, exit, remove; p50 of 30 runs after 5 warm-up runs.",
  "orbstack": {
    "version_note": "OrbStack, Linux 7.2.9-orbstack, Docker CLI",
    "rows": [
      {
        "metric": "docker run --rm alpine true",
        "value_ms": 325,
        "range": "300-350",
        "status": "measured"
      },
      {
        "metric": "docker run -d (alpine/redis/python/nginx)",
        "value_ms": 205,
        "status": "measured"
      },
      {
        "metric": "docker start (pre-created)",
        "value_ms": 88,
        "status": "measured"
      },
      {
        "metric": "docker unpause",
        "value_ms": 23,
        "status": "measured"
      },
      {
        "metric": "Docker CLI round trip floor",
        "value_ms": 19,
        "status": "measured"
      },
      {
        "metric": "dockerd + containerd resident memory",
        "value_mb": 216,
        "status": "measured"
      },
      {
        "metric": "per-container shim memory",
        "value_mb": 7.9,
        "status": "measured",
        "detail": "143 shims = 1133 MB"
      }
    ]
  },
  "kiri": {
    "rows": [
      {
        "metric": "run --rm alpine true (Docker API, bridge network)",
        "value_ms": 2.55,
        "status": "measured",
        "detail": "p50 of 30 next to OrbStack and Docker Desktop; 1.26 ms alone with --network none"
      },
      {
        "metric": "kiri run -d",
        "value_ms": 6,
        "status": "target"
      },
      {
        "metric": "start pre-created",
        "value_ms": 4,
        "status": "target"
      },
      {
        "metric": "resume paused (cgroup freezer)",
        "value_ms": 1,
        "status": "target"
      },
      {
        "metric": "per-container shim memory",
        "value_mb": 0,
        "status": "measured",
        "detail": "no shim process exists; the guest agent supervises every container"
      },
      {
        "metric": "engine daemon resident memory",
        "value_mb": 9.7,
        "status": "measured",
        "detail": "kiri daemon on the Mac (9.0 MB footprint) plus the guest agent inside the VM (0.69 MB resident); compare OrbStack dockerd + containerd"
      },
      {
        "metric": "guest init binary size",
        "value_kb": 650,
        "status": "measured",
        "detail": "PID 1, guest agent and container runtime, with gzip/zstd/tar for layers"
      },
      {
        "metric": "kiri host binary size",
        "value_kb": 2165,
        "status": "measured",
        "detail": "includes TLS for pulls, the Docker API server and the window"
      },
      {
        "metric": "VM cold boot to agent ready (total)",
        "value_ms": 112,
        "status": "measured",
        "detail": "median of 5; was 810 ms with a stock defconfig kernel"
      },
      {
        "metric": "Virtualization.framework configure + start",
        "value_ms": 95,
        "status": "measured",
        "detail": "Apple's helper process start; outside Kiri"
      },
      {
        "metric": "guest kernel boot to PID 1",
        "value_ms": 8,
        "status": "measured",
        "detail": "was 680 ms (defconfig) -> 40 ms (allnoconfig) -> 8 ms (virtio reset patch)"
      },
      {
        "metric": "PID 1 to agent ready",
        "value_ms": 0.4,
        "status": "measured",
        "detail": "was 15 ms before rcu_expedited"
      },
      {
        "metric": "clean guest shutdown",
        "value_ms": 2.2,
        "status": "measured"
      },
      {
        "metric": "host <-> guest vsock round trip p50",
        "value_us": 31,
        "status": "measured"
      },
      {
        "metric": "host <-> guest vsock round trip p99",
        "value_us": 62,
        "status": "measured"
      },
      {
        "metric": "guest kernel image size",
        "value_kb": 10264,
        "status": "measured",
        "detail": "was 32 MB"
      },
      {
        "metric": "daemon idle CPU",
        "value_pct": 0.0,
        "status": "measured"
      },
      {
        "metric": "VM helper process footprint (Virtualization.framework)",
        "value_mb": 69,
        "status": "measured"
      }
    ]
  },
  "kernel_primitives": {
    "note": "Measured inside a Linux 7.2 VM; the building blocks of a container start",
    "rows": [
      {
        "metric": "fork + exec",
        "value_ms": 0.54
      },
      {
        "metric": "mnt+uts+ipc+pid namespaces + exec",
        "value_ms": 0.78
      },
      {
        "metric": "+ network namespace",
        "value_ms": 1.15
      },
      {
        "metric": "cgroup v2 create + limit + remove",
        "value_ms": 1.23
      },
      {
        "metric": "overlay mount + unmount",
        "value_ms": 0.36
      },
      {
        "metric": "veth create + attach to bridge",
        "value_ms": 2.2
      },
      {
        "metric": "veth delete (Docker does this before --rm returns)",
        "value_ms": 18.9
      }
    ]
  },
  "boot_journey": [
    {
      "step": "stock arm64 defconfig kernel",
      "boot_ms": 810
    },
    {
      "step": "allnoconfig + only what the VM has",
      "boot_ms": 175
    },
    {
      "step": "expedited RCU (cgroup2 mount 23 ms -> 0.1 ms)",
      "boot_ms": 140
    },
    {
      "step": "virtio-pci reset poll patch",
      "boot_ms": 112
    }
  ],
  "lifecycle": {
    "test": "alpine:latest → true → exit → removed",
    "runs": 30,
    "tail": "p95",
    "measured": "2026-11-02",
    "caveats": [
      "Every engine was limited to 2 CPUs and 8 GB and checked with docker info: Kiri 0.1.13-dev.31, Docker Desktop 4.90.0, OrbStack 2.2.4 (Kubernetes off), Colima 0.10.3 (vz, virtiofs).",
      "One kiri-bench full run, engines back to back with the same docker CLI (29.7.2), 30 samples after 3 warmups, warm images, nothing else running inside the engines.",
      "The docker CLI rows use Docker's default bridge network. The Docker API rows create, start, wait for and delete a container with --network none.",
      "Most of Kiri's 22 ms through the docker CLI is the docker CLI itself starting up."
    ],
    "rows": [
      {
        "engine": "Kiri",
        "path": "docker CLI (context kiri)",
        "network": "bridge",
        "p50_ms": 22.0,
        "p95_ms": 45.2,
        "status": "measured"
      },
      {
        "engine": "Docker Desktop",
        "path": "docker CLI",
        "network": "bridge",
        "p50_ms": 178.0,
        "p95_ms": 278.0,
        "status": "measured"
      },
      {
        "engine": "OrbStack",
        "path": "docker CLI",
        "network": "bridge",
        "p50_ms": 279.0,
        "p95_ms": 443.0,
        "status": "measured"
      },
      {
        "engine": "Colima",
        "path": "docker CLI",
        "network": "bridge",
        "p50_ms": 152.0,
        "p95_ms": 165.0,
        "status": "measured"
      },
      {
        "engine": "Kiri",
        "path": "Docker Engine API (kiri daemon)",
        "network": "none",
        "p50_ms": 3.1,
        "p95_ms": 5.9,
        "status": "measured"
      },
      {
        "engine": "Docker Desktop",
        "path": "Docker Engine API",
        "network": "none",
        "p50_ms": 163.0,
        "p95_ms": 266.0,
        "status": "measured"
      },
      {
        "engine": "OrbStack",
        "path": "Docker Engine API",
        "network": "none",
        "p50_ms": 238.0,
        "p95_ms": 284.0,
        "status": "measured"
      },
      {
        "engine": "Colima",
        "path": "Docker Engine API",
        "network": "none",
        "p50_ms": 88.3,
        "p95_ms": 103.0,
        "status": "measured"
      }
    ]
  }
}
