# container_profile


Defines the container profile of the application.

Optional in [single-runtime](https://docs.upsun.com/create-apps/app-reference/single-runtime-image.md#primary-application-properties) and [composable](https://docs.upsun.com/create-apps/app-reference/composable-image.md#primary-application-properties) 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](https://docs.upsun.com/manage-resources/resource-init.md) topic. 

When you change the container _size_ assigned to an app or service (by using the CLI or Console; see [below](#changing-the-container-size)), 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](https://docs.upsun.com/manage-resources/adjust-resources.md#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](https://docs.upsun.com/manage-resources/adjust-resources.md#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``.
<BR>If your `.applications..stack.runtimes` key defines multiple runtimes, you need to do one of the following:
- Change
the `.applications..container_profile `[default container_profile](https://docs.upsun.com/manage-resources/adjust-resources.md#advanced-container-profiles)
- Change [default CPU and RAM ratio](https://docs.upsun.com/manage-resources/resource-init.md) on first deployment using the following
commands:

    ```bash
    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](https://docs.upsun.com/manage-resources/adjust-resources.md) topic. 
- For details about container sizes for each resource allocation strategy (shared CPU, guaranteed CPU, and initial allocation), see the [Advanced: Container profiles](https://docs.upsun.com/manage-resources/adjust-resources.md#advanced-container-profiles) section of the "Resource configuration" topic.


