The machine configuration is optional. Using higher spec machines will increase the cost of running the task but can also improve the performance of the task if it is CPU or memory bound.

/trigger/heavy-task.ts
export const heavyTask = task({
  id: "heavy-task",
  machine: {
    preset: "large-1x",
  },
  run: async ({ payload, ctx }) => {
    //...
  },
});

The default machine is small-1x which has 0.5 vCPU and 0.5 GB of RAM. You can change the default machine in your trigger.config.ts file:

trigger.config.ts
import type { TriggerConfig } from "@trigger.dev/sdk/v3";

export const config: TriggerConfig = {
  machine: "small-2x",
  // ... other config
};

Machine configurations

PresetvCPUMemoryDisk space
micro0.250.2510GB
small-1x (default)0.50.510GB
small-2x1110GB
medium-1x1210GB
medium-2x2410GB
large-1x4810GB
large-2x81610GB

You can view the Trigger.dev cloud pricing for these machines here.