Developer Center

Scheduling and resources

PowerTools schedules your services based on group and lets you easily control resource allocations

Control how your services are scheduled, and how much ram and cpu they are allocated from your service.yml schema.

This section does not apply to static components.

Group based scheduling

Each PowerTools service belongs to a group.

When you deploy a service, PowerTools automatically reconciles where to schedule your service based on the configuration of the group found in the deployed .powertools/workspace.yml

You can change a service's group by updating the schema and then redeploying.

Memory and cpu allocations

You can easily control how much ram and cpu is allocated to your service by defining the cpu and ram fields for each applicable component in your schema.

To declare a static amount of resources:

  - https-public
    mem: 128m
    cpu: 100m

You can also setup vertical autoscaling for your service by adding a range:

  - https-public
    mem: 128m - 512m
    cpu: 100m - 500m

Behind the scenes, PowerTools will automatically set the CPU and MEM requests and limits for you.

The default unit for CPU is milliCPU, where 1000m means 1 core.

The default unit for MEM is MiB (mebibyte).

Build and development

Currently, no memory or cpu limits are applied to services running using pt dev or during pt build.

We will be adding support for remote build and dev soon!