Skip to content

No resource limits on any container, and no size bound on retention #71

Description

@Gerrrt

No service in compose.yaml sets mem_limit, cpus, deploy.resources,
pids_limit or ulimits. On a 2012 MacBook Pro with 7.6 GB shared between six
containers, any one of them can take the host down, and the first symptom would
be the monitoring stack going away.

Current steady-state usage, for sizing:

container memory
grafana 246 MiB
prometheus 137 MiB
alloy 128 MiB
loki 115 MiB
alertmanager 19 MiB
snmp-exporter 16 MiB

Two knock-on effects:

  • ContainerHighMemory can never fire without a limit to measure against —
    tracked separately.
  • Prometheus retention is time-only (--storage.tsdb.retention.time=30d) with
    no --storage.tsdb.retention.size, so disk growth is likewise unbounded and
    handled reactively by HostDiskWillFillIn24h rather than prevented. 23 G of
    98 G used today.

Also absent, and worth deciding on separately: read_only, cap_drop,
security_opt: no-new-privileges. Alloy is the one that cannot have most of
them — it is privileged: true with the Docker socket and /:/rootfs — which
is its own argument for limiting the others.

Found while verifying #12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions