Better-PaaS
Guides

Resource Limits

Cap how much memory and CPU each app can use so one app can't starve the others.

When several apps share one server, you don't want a single hungry app eating all the memory and CPU. Better-PaaS lets you set per-app limits that Docker enforces.

Setting limits

Open your app and go to the Configuration tab.

Set a memory cap and/or a CPU cap.

Save and redeploy. The limits are applied via docker run --memory and --cpus.

Memory values

Use a number with a unit:

ValueMeaning
512m512 megabytes
1g1 gigabyte
2g2 gigabytes

If an app tries to exceed its memory limit, the container is restricted (and may be killed and restarted by Docker) — protecting the rest of the server.

CPU values

CPU is expressed as a number of cores, and fractions are allowed:

ValueMeaning
0.5half a CPU core
1one full core
2two cores

Choosing good limits

  • Start a little generous, then watch the app's live CPU/memory in its Overview tab and tighten if there's headroom.
  • Leave room for the host itself and for other apps — don't allocate 100% of the server to one app.
  • Memory-heavy apps (databases, image processing) need higher memory caps; bursty web apps usually need more CPU than memory.

Next step

On this page