Platform.sh is now Upsun. Click here to learn more
Upsun Fixed User Documentation

Adjusting resources on Fixed projects

Try Upsun for 15 days
After that, enjoy the same, game-changing Upsun features for less with the First Project Incentive!¹ A monthly $19 perk!
Activate your 15-day trial
¹Terms and conditions apply

In Upsun Fixed projects, the amount of resources (memory) provisioned for a project is fixed. However, you can still adjust the amount of memory your app can use by setting the resources key in your app configuration. The value of this key cannot exceed the limit set by your plan. For example, you might increase the resources value for memory-intensive apps. In such cases, you can adjust the amount of memory using the resources key in your app configuration.

The resources key has the following possible options:

Name Type Minimum Description
base_memory integer 64 The base amount of memory in MB to be given to the container. Up to 1024.
memory_ratio integer 128 The amount of memory in MB that increases with CPU size. Up to 1024.

The memory allocated to the container is calculated as the base memory plus the memory ratio multiplied by the CPU: memory = base_memory + (memory_ratio * CPU).

When the resources key is set, the CPU sizes come from the following table:

Size CPU
XS 0.25
S 0.5
M 1
L 2
XL 4
2X L 8

So you might have the resources set as follows:

.platform.app.yaml
resources:
  base_memory: 128
  memory_ratio: 180

If your app is set with a size of S, it gets 218 MB of memory: 128 + (0.5 * 180) = 218. If you change the size to L, it gets 488 MB of memory: 128 + (2 * 180) = 488.

Other containers and workers Anchor to this heading

Setting the resources key on one app doesn’t affect other apps in your project. So you can set it for one app and have your other apps be assigned resources automatically.

Workers based on apps with the resources key default to inheriting the set resources. To free memory for your main app, set the values within the resources key to be lower for your workers.

Performance profiles Anchor to this heading

The two options for resources allow for different performance profiles. Some apps, such as many PHP apps, don’t require so much memory to start but need a lot of memory for each parallel request. Such apps benefit from a low base_memory and a high memory_ratio.

Other apps, such as those with a persistent runtime including many Java and Go apps, require more memory to get started but don’t need much memory for each parallel request. Such apps benefit from a high base_memory and a low memory_ratio.