> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Machine sizes

> Choose CPUs with size and memory per CPU with memory.

Set `size` to choose how many CPUs a job gets, and `memory` to choose how much
memory it gets per CPU.

```yaml theme={"system"}
runs-on: trunk=${{ github.run_id }}-${{ github.run_attempt }}..size=large..memory=high
```

## Sizes

| Size | `low` | `standard` | `high` |
| - | - | - | - |
| `xsmall` (1 CPU) | 1 GiB | 2 GiB | 4 GiB |
| `small` (2 CPUs) | 2 GiB | 4 GiB | 8 GiB |
| `medium` (4 CPUs) | 4 GiB | 8 GiB | 16 GiB |
| `large` (8 CPUs) | 8 GiB | 16 GiB | 32 GiB |
| `xlarge` (16 CPUs) | 16 GiB | 32 GiB | 64 GiB |

The columns are the `memory` values: 1, 2, or 4 GiB per CPU.

## The default machine

With no `size`, a job gets 2 CPUs and 8 GiB, the same machine as GitHub's
`ubuntu-latest` runner for private repositories. Jobs you move over keep the
machine they had.

```yaml theme={"system"}
runs-on: trunk=${{ github.run_id }}-${{ github.run_attempt }}
```

> [!WARNING]
>
> `size=small` on its own is 2 CPUs and 4 GiB, half the memory of the default
> machine. Use `size=small..memory=high` if you want to name the size and keep 8
> GiB.

## Picking a size

Start with the size closest to what the job ran on before. Use `memory=high`
for jobs that run out of memory, such as large builds, and `memory=low` for
jobs that need CPUs but not much memory.

An unknown value, such as `size=huge`, gets no runner: the job stays queued
with no error. See the [label rules](https://docs.trunk.io/runners/reference/runs-on-grammar.md#rules).
