Memory and CPU limits
Each datastore has a memory limit and a CPU limit. A change applies with no restart.
$ ferry db update app-db --memory 2GUpdated datastore 'app-db': memory limit 2 GiBApplied to the running container (no restart).The container of a datastore has its own limits, or the defaults of the server. The defaults are 512 MiB and 1 CPU, unless ferryd sets other values.
You can change the limits at all times, in each status of the datastore. The container gets the new limits immediately. A service is different: it needs a restart.
Go back to the default
ferry db update cache --cpu default # back to the server defaultIn the dashboard, use the Resources section on the page of the datastore.
Be careful when you lower a limit
A memory limit below the current use of the datastore can fail to apply. The system can also stop the datastore, because it has no more memory. This is an OOM kill.
Ferry saves the new limits anyway, and the error tells you. Run the update again to try again.
A failed datastore keeps the new limits for its next start. Use this when a datastore had no more memory during its creation:
the postgres container ran out of memory (limit 512 MiB) — raise the datastore's memory limitRaise the limit. The next retry uses it.
Redis gets a maxmemory of 3/4 of its memory limit. When Redis is full, it refuses writes, and the system does not stop it.
Redis keeps each key in memory. Keep the limit well above the size of your data.
PATCH /api/v1/datastores/{id}. See Change a datastore's resource limits.
See Resource limits.