ConceptsResource limits
The five guards
Five guards stop a container that uses too much of the server.
Too much memory: the kernel stops the process. Then Docker starts it again.
1 / 5
Ferry puts five guards around each container that it starts. Each guard has a default value.
The defaults
| Guard | Default | Set with |
|---|---|---|
| Memory | 512 MiB | The service or the datastore. If not set: --default-memory-limit |
| CPU | 1 CPU | The service or the datastore. If not set: --default-cpu-limit |
| Processes | 1024 | --pids-limit |
| Logs | 10 MiB × 3 files | --log-max-size, --log-max-files |
| Free disk | 1 GiB free | --min-free-disk |
The flags are options of ferryd. See Server defaults.
A limit is for one container
Containers do not share a limit. A service with 3 instances can use 3 times its limit, plus the limit of each job that runs.
A limit is a cap. It does not reserve memory or CPU. Ferry does not make sure that all the limits together fit on the server.
A build has no limit of memory or CPU. See What Ferry does not limit.