Skip to Content
Docs

Configure a Custom Worker Size

Set CPU and memory requests and limits for each Worker instance in the admin console.

Use a custom size to adjust CPU and memory independently. For example, if a Worker that compresses files needs more CPU, you can raise its CPU request and limit while keeping the preset's memory settings.

To configure a custom size with the CLI, see Set the Size.

The size applies to each replica. All containers in that replica share its CPU and memory, including the app and host in a managed Worker. Replica settings control how many copies run.

To choose values for your workload and test them, see Choose a Worker Size.

Set the Size in the Admin Console

  1. In the admin console, open Build > Workers. Select your Worker and open Details, or select New Worker to set the size during creation.
  2. Under Size, select Custom…. If you had a preset selected, the console copies its values. To start from another preset, select it under Start from.
  3. Under CPU and Memory, enter a Request and a Limit, or drag the corresponding sliders. The request reserves capacity for the replica. The limit is the most it can use. Use the sizing rules to choose values.
  4. Select Save for an existing Worker or Create for a new one. Saving starts a deployment. Existing instances keep their size until they stop or are replaced. New instances use the saved size.
  5. Open Deployment to check instance readiness. If the Worker is scaled to zero or runs on a schedule, check the next event or scheduled run. Test with a typical workload and check its processing time and whether the instance restarts.

To return to a preset, select its name in Size and save. This replaces the custom values with the preset's CPU and memory settings.

Sizing Rules

Resource Minimum request Minimum limit Maximum limit relative to request
CPU 25m 50m 4 times the CPU request
Memory 128Mi 128Mi 2 times the memory request

Enter CPU in cores or whole millicores. Both 0.5 and 500m mean half a core. For memory, include Mi or Gi, as in 512Mi or 1Gi. The console rounds fractional memory values up to whole MiB.

For each resource, the request must be at or below the limit. All four values must fit within one Worker size available to your tenant. If the console rejects the combination, select a preset under Start from and adjust from there.

For example, to allow up to half a CPU core, enter 125m for the CPU request and 500m for the limit. If the workload needs 256Mi of memory in normal use and up to 384Mi at peak, enter those as its memory request and limit.