Container Profiles

Aptible offers three Container Profiles with unique CPU-to-RAM ratios and sizes. Container Profiles provide flexibility and cost-optimization by allowing users to select the workload-appropriate Profile. The General Purpose Container Profile is available by default in all Stacks. CPU and RAM Optimized Container Profiles are only available in Dedicated Stacks which have both Memory Limits and CPU Limits enabled. Enabling both Memory and CPU Limits on a Stack is referred to as Enforced Resource Allocation.

Container Profiles

The Container Profiles currently available are as follows:

  • General Purpose: The default Container Profile, which works well for most use cases.
  • CPU Optimized: For CPU-constrained workloads, this Profile provides high-performance CPUs and more CPU per GB of RAM.
  • Memory Optimized: For memory-constrained workloads, this Profile provides more RAM for each CPU allocated to the container.

Overview:

Container ProfileCPU:RAM RatioRAM per CPUContainer SizesCost
General Purpose1/4 CPU : 1GB RAM4GB / CPU512MB-241GB$0.08/GB/Hour
RAM Optimized1/8 CPU : 1GB RAM8GB / CPU4GB-653GB$0.05/GB/Hour
CPU Optimized1/2 CPU : 1GB RAM2GB / CPU2GB-163GB$0.10/GB/Hour

For a Container with the General Purpose Profile, you should expect to find the following memory-to-CPU ratios, for example:

  • 2 GB container: ½ vCPU.
  • 4 GB container: 1 vCPU.
  • 8 GB container: 2 vCPU.

Enforced Resource Allocation

Enabling both Memory and CPU Limits on a Stack is referred to as Enforced Resource Allocation. Memory Limits are enabled on all Stacks by default and CPU Limits are enabled on all Shared Stacks. Dedicated Stacks created before 2021 do not have CPU Limits enabled by default which means that only the General Purpose Container Profile will be available. Since 2021, newly created Dedicated Stacks have CPU Limits enabled by default which means that all three Container Profiles will be available. The status of CPU Limits and Memory Limits can be verified in the Aptible Dashboard by selecting the Stack name and viewing the CPU Limits and Memory Limits sections.

Without Enforced Resource Allocation, Containers have the potential to consume more than their share of allocated resources by stealing resources from other Containers thereby impacting the performance of other Containers and causing unexpected errors or timeouts in other Containers. Enabling Enforced Resource Allocation will improve the reliability of the services provisioned on the given Stack. Aptible highly recommends enabling Enforced Resource Allocation for older Dedicated Stacks which have CPU Limits disabled.

The CPU Limits documentation outlines the impact of enabling CPU Limits and the process to do so. For Dedicated Stacks without CPU limits enabled, please contact Aptible Support to enable CPU Limits which will make the CPU Optimized and RAM Optimized Container Profiles available for use.

Is a restart required when changing Container Profiles?

Yes, the newly selected Container Profiles takes effect upon restart.

Can the CPU:RAM ratio allocated to Containers be customized?

No, the number of CPUs per unit of RAM is fixed for each Container Profile.

What is the process to modify Container Profiles?

To change the Container Profile specified for a Service:

  • Navigate to the service.
  • Select Scale.
  • Choose a Container Profile from the dropdown in the Container Profile section.
  • Click Scale Service to confirm the change.
1828

After a restart, the service will run on containers using the selected Container profile.

See Also