Expand description
CPU, memory and process limits of a container agent’s container.
docs/specs/SPEC_CONTAINER_AGENT_RESOURCE_LIMITS_2026_10_29.md.
Every container agent is limited, existing ones too. What it gets is the agent’s own setting, else the app-wide
one, else a default computed from what the Docker daemon has (docker info: on Docker Desktop that is the VM, not
the machine). The limits are put on a running container with docker update: a change never recreates it.
Structs§
- Container
Limits - An agent’s own limits (
db_agent_container_limits).Limit::Automeans “the app-wide setting decides”. - Daemon
Capacity - What the daemon has to give.
- Wanted
- The limits a container should carry.
Enums§
Constants§
- RECOMMENDED_
MIN_ MEMORY_ LABEL - An image label saying how much memory a container from it needs to be useful, in MB: a developer image that builds Rust says so, and auto never gives it less (still bounded by what the daemon has).
- SETTING_
CPUS - App-wide default CPU limit, in CPUs, or
"auto". - SETTING_
MEMORY - App-wide default memory limit, in MB, or
"auto".
Functions§
- auto_
cpu_ millis - The default CPUs, in thousandths: all but a quarter of the cores, at least one.
- auto_
memory_ bytes - The default memory: half of the daemon’s, never under 2 GiB (capped at what the daemon has). The spec’s ceiling of “total minus 2 GiB” is never under half from 4 GiB up, and under 4 GiB the floor rules, so it needs no code. An image’s recommended minimum raises the default, still bounded by the daemon’s total.
- install_
config - Attach the live settings (bootstrap), so the app-wide limits can be read.
- normalize
- A limit as stored:
""for auto,"0"for no limit, else the number (MB, or CPUs). An explicit value that is none of these is an error, whereLimit::from_jsonis lenient with what it reads back.