Skip to main content

Resource management

This article refers to Platform v3.1.0. The current Platform version is v3.2.0.

Overview

Edge nodes are resource-constrained machines. A single misbehaving container can starve every other workload on the node. Docker Compose lets you put limits and reservations on the CPU and memory each service can use, so the runtime keeps a noisy workload from monopolising the box.

Compose syntax

Resource constraints live under deploy.resources next to a service:

version: '3.8'

services:
filebrowser:
image: filebrowser/filebrowser:latest
ports:
- "8080:80"
deploy:
resources:
limits:
cpus: "0.5"
memory: "256M"
reservations:
cpus: "0.25"
memory: "128M"

What each block does:

  • limits — hard ceiling.
    • cpus: "0.5" — the container cannot use more than 50 % of a single CPU core.
    • memory: "256M" — the container is killed by the kernel if it tries to use more than 256 MB of RAM.
  • reservations — soft floor.
    • cpus: "0.25" — the scheduler guarantees the container can use at least 25 % of a core when needed.
    • memory: "128M" — the scheduler holds at least 128 MB of RAM in reserve for the container.

Practical guidance

  • On Barbara nodes with limited CPU (1-2 cores), prefer fractional CPU limits to keep a single container from saturating the box.
  • Always set a memory limit for long-running workloads — without one, a leak in the app eventually OOMs the entire node.
  • Reservations are useful when you have many concurrent containers and want to guarantee a baseline for the critical ones.

Summary

deploy.resources.limits and deploy.resources.reservations are the two knobs to keep a Docker workload from misbehaving on a constrained edge node. Set sensible defaults for every workload you ship — especially memory limits.