Skip to content

Image pull performance — registry mirrors, benchmark, cross-run layer cache #4

Description

@adrianlungu

Apple Container CLI's image pull is noticeably slower than Docker. This issue tracks the investigation + tuning work.

Known contributors

  • Apple Container CLI's registry client is newer and less tuned than Docker's (HTTP/2 multiplexing, layer parallelism, etc.)
  • ext4 volume formatting overhead — Apple formats each volume as ext4 on first touch; Docker uses overlayfs which skips the FS format step
  • In full-isolation mode every VM is fresh, so layer cache doesn't carry across runs
  • `gocker pull` gained the knobs in v0.7.0 (`--platform`, `--max-concurrent-downloads`/`-j`, `--progress` with TTY auto-detect), but defaults haven't been tuned

What to do

  1. Benchmark: `time gocker pull postgres:16-alpine` vs `time docker pull ...` with cold caches. Break down where time goes (DNS, HTTP, extract, ext4 format) to know which slice is actually our problem.
  2. Registry mirror config in `~/.gocker/config.yaml` — `registryMirrors: [mirror.gcr.io, ...]`. For people on slow links or behind a caching proxy.
  3. Cross-run layer cache in full mode — today every fresh VM re-pulls. Explore sharing a snapshotter or pre-seeding layers from the host.
  4. Skip multi-platform manifest fetches if Apple CLI is pulling both amd64 and arm64 — should halve bytes on multi-arch images.

Scope

Investigation-first. Numbers tell us which fix actually matters. Do (1) before implementing anything else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    roadmapPlanned work, tracked in the roadmap

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions