ConceptsResource limits
The CPU limit
A CPU limit is the most CPU time that one container can use.
Each container uses a part of the CPUs of the server.
1 / 4
A CPU limit is the most CPU time that one container can use. The default limit is 1 CPU.
At the limit, the kernel does not stop the container. It throttles it.
Write an amount
| You write | Ferry reads |
|---|---|
0.5 | Half a core |
2 | Two cores |
500m | 500 millicores (0.5) |
Ferry rounds an amount to 0.01 CPU. A limit can be from 0.01 to 512 CPUs.
Set the limit
ferry create api --repo https://github.com/you/api --memory 1G --cpu 0.5
ferry update api --cpu default # back to the server defaultSmall servers
On a server with one CPU, the default limit of 1 CPU is the full server. Use a lower --default-cpu-limit there, for example 0.5.