container_profile
Back to home
On this page
Defines the container profile of the application.
Optional in single-runtime and composable images.
A container profile is a CPU-to-memory ratio that defines how much CPU and RAM a container can use. Four container profiles are available: HIGH_CPU, BALANCED, HIGH_MEMORY, and HIGHER_MEMORY.
By default, Upsun assigns a container profile and container size to each application and service upon the first deployment of a project. You can configure this resource initialization strategy- for details, see the Resource initialization topic.
When you change the container size assigned to an app or service (by using the CLI or Console; see below), the profile enforces the CPU-to-RAM ratio, ensuring your container is sized correctly.
To choose a different CPU-to-memory ratio, change the container_profile key. See Adjust a container profile in the “Resource configuration” topic.
Single-runtime images
In a single-runtime image, you typically don’t need to change the container_profile key of any of the apps and services. For the default profile values assigned for each runtime and service, refer to the Default container profiles table in the “Resource configuration” topic.
Composable images
The default container profile for an app or service in a composable image is HIGH_CPU.
If your .applications.<app_name>.stack.runtimes key defines multiple runtimes, you need to do one of the following:
-
Change the
.applications.<app_name>.container_profiledefault container_profile -
Change default CPU and RAM ratio on first deployment using the following commands:
upsun push --resources-init=manual
Changing the container size
You can change the container size assigned to an app or service by using the Upsun CLI or Console:
- For detailed steps, see the Resource configuration topic.
- For details about container sizes for each resource allocation strategy (shared CPU, guaranteed CPU, and initial allocation), see the Advanced: Container profiles section of the “Resource configuration” topic.