Skip to content

perf(local): kind nodes each hold a full copy of every image, ~30 GB per worker for ~16 GB of images #1370

Open

Description

@malon64

Problem

docs/guides/local-installation.md says the Full DEV+PROD deployment needs
100 GB of free disk, and that "most of the disk is container images, not
data". A measured local deployment confirms it, and shows the disk is
multiplied by the number of kind nodes, not by the number of stages.

Measurements

Local deployment openlakeforge-local, three kind nodes (infra/kind/local/kind-cluster.yaml:
one control plane, two workers), Docker in WSL2 Ubuntu, read-only inspection:

Node /var/lib/containerd Images (crictl images)
control-plane 5.3 GB 18
worker 30 GB 41
worker2 30 GB 41

Both workers hold the same 41 images. The 15 largest on a worker sum to about
14 GB, so I estimate 16 to 17 GB of images for 30 GB on disk. The largest:

Image Size
openmetadata/ingestion-base:1.13.6 4.67 GB
opensearchproject/opensearch:3.3.2 1.51 GB
trinodb/trino:480 1.39 GB
olf.local/project-code 1.19 GB
superset:0.5.1-alpha.3 0.92 GB

Host side, same machine: 158 images (61 GB, 42.4 GB reclaimable), 37 GB of
build cache, 72 GB in 18 volumes of which 3 are active.

DEV and PROD already share images

Stages are namespaces in one cluster, so one containerd store per node serves
every stage. The platform images come from the component catalog, one version
for all stages, and the project-code image is stage-neutral: "One project-code
image therefore serves every stage, and nothing stage-bound is baked into it"
(docs/architecture/floe-validation.md). Prefetch
(tools/olf/olf/infra/deployment/local/prefetch.py) loads each image once per
node, not once per stage. Sharing images between DEV and PROD would therefore
save nothing; the duplication is across the two workers, which load the same
images in parallel (_prefetch_one_image).

Not yet measured

  • The split inside /var/lib/containerd between compressed blobs
    (io.containerd.content.v1.content) and unpacked snapshots
    (io.containerd.snapshotter.v1.overlayfs). My hypothesis is that the ~2x
    between the image sum and the disk use is blobs plus snapshots; this is
    unconfirmed.
  • Whether openmetadata/ingestion-base is needed on the Slim preset.

Scope note

This is local only. A managed cluster (EKS, AKS, or any cloud Kubernetes)
pulls from a registry and each node holds only the images of the pods it runs,
so the same figures do not apply there.

Options

  1. Run one worker instead of two in the local kind cluster. Nothing pins a
    stage to a node in the local values I read, but the two-worker layout may
    exist to test scheduling or isolation; check before removing it.
  2. Share one registry between the kind nodes (kind's "local registry"
    pattern) instead of loading every image into every node. Needs a change to
    prefetch, which loads into the nodes so pods need no registry credentials
    (common/deployment/local/config.py).
  3. Load an image only into the nodes whose pods use it.
  4. Check whether ingestion-base can be dropped or replaced on Slim.
  5. Have olf infra destroy prune the build cache and unused images it
    created.
  6. Re-measure with Docker's containerd image store enabled.

Done when

  • The blobs-versus-snapshots split is measured and recorded here.
  • The hardware table in local-installation.md is updated with the measured
    numbers for the chosen option, or the issue records why none is worth it.

Activity

  1. malon64 commented on Nov 22, 2026

    @malon64
    CollaboratorAuthor

    Blobs versus snapshots: measured

    Measured on a fresh Full DEV+PROD deployment, small, metrics on, main 5120c3b, three kind nodes. Command: du -sh inside each node.

    Node content.v1.content (blobs) snapshotter.v1.overlayfs (unpacked) Images
    control-plane 2.5 GB 2.8 GB 14
    worker 14 GB 16 GB 37
    worker2 14 GB 16 GB 37

    The hypothesis holds: each worker stores every image twice, once as blobs and once unpacked.

    The blobs are nearly as large as the unpacked layers because prefetch loads with docker save followed by ctr import (tools/olf/olf/infra/deployment/local/prefetch.py). A docker save archive carries uncompressed layer tars, so the content store keeps uncompressed blobs. A registry pull would store compressed ones. In total, about 62 GB across the nodes holds about 16 GB of distinct images, roughly 4x: 2x from blobs plus snapshots, and 2x from the two workers.

    Assessment of the options

    • One worker (option 1) saves about 30 GB outright. No stage-to-node pinning, affinity or topology spread is documented. The only node pin is Traefik to the control plane (ingress-ready). All kind nodes share the same host's CPU and RAM, so the second worker adds no capacity. Before removing it, check whether any check depends on cross-node traffic, for example the NetworkPolicy canary or the network-flow drill.
    • Dropping the duplicated blobs. Two candidates, to verify:
      • containerd's CRI discard_unpacked_layers, set through kind's containerdConfigPatches. It may apply only to CRI pulls, not to ctr import.
      • Pruning the content after import.
        Either could save about 14 GB per worker.
    • Shared local registry (option 2) stores compressed blobs once on the host, and each node pulls only what it runs, which also gives option 3. It is the larger change: prefetch and the registry lifecycle both change.
    • Options 4–6 are small or orthogonal and can be follow-ups.
  2. malon64 commented on Nov 22, 2026

    @malon64
    CollaboratorAuthor

    Follow-ups filed:

    The shared local registry stays the longer-term option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions