seawall stack limits
Set a stack's resource limits: memory, CPU, processes, open files.
Set a stack's resource limits: memory, CPU, processes, open files
A dry run until --yes, which writes the disk copy and deploys it.
Usage
seawall stack limits [OPTIONS] <STACK>
Changes the host
Without --yes it prints the plan and changes nothing.
Arguments
<STACK>The stack, by Portainer name or directory
Options
--yesWrite the change and deploy it
--neverStop proposing limits for this stack (remembered)
--againPropose limits for a stack that skipped them
--cpu-capA hard CPU quota too, sized from use (by default a CPU weight alone)
--remove <SETTING>Take limits out instead: cpus,
mem_limit,pids_limit, ulimits, or all (comma-separate), whoever set them--undo <SETTING>Put back what seawall changed instead (cpus,
mem_limit, ..., or all): a limit it raised goes back to the one before, one it added goes, others stay--service <SERVICE>With --remove or --undo: only this service's
--no-deployWrite the disk copy only, don't deploy it
--untriedDeploy even when the trial copy can't run (else the change stops there)
--diffShow the compose diff, by service, and the notes too
--waitAfter a redeploy, wait out the 2-minute compare with before. Without it the facts timer runs it (
SeawallDeployWorse)
Examples
seawall stack limits ghost
seawall stack limits ghost --yes
seawall stack limits monitoring --remove cpus --service cadvisor --yes
seawall stack limits monitoring --undo all
seawall stack limits game --never
Notes
Limits are a backstop against a container running away. Memory is a hard limit at twice its observed peak (an alert when a container nears it); CPU a weight (cpu_shares), which only counts when containers compete; processes one fixed cap of 4096. --cpu-cap adds a hard CPU quota, four times the 99th percentile of each minute (at least one core, raised when throttled in more than 5% of its periods); collectors and proxies never get one. With --yes it writes the disk copy and deploys it, backed up, rolled back if it doesn't settle, and watched.