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

PresetvCPUMemory
micro0.250.25
small-1x0.50.5
small-2x11
medium-1x12
medium-2x24
large-1x48
large-2x816

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