# Runner sizes

Pick the machine a job runs on by naming its size in runs-on, such as dc-16x32 for 16 vCPU and 32 GiB; your organization gets the pool for that size the first time a job asks.

A runner size is a `runs-on` label that names a machine: `dc-<vCPU>x<memory in GiB>`. Write it in
the workflow and the job runs on a machine of that size, the way GitHub's larger runners work. You
create no runner pool for it and connect nothing per size.

```yaml
jobs:
  build:
    runs-on: [self-hosted, dc-16x32]
    steps:
      - uses: actions/checkout@v4
      - run: make -j16 test
```

This works for the jobs of a GitHub repository you connected (see
[Run the jobs of a GitHub repository on a runner pool](run-jobs-of-a-github-repository.md)) and for
GitHub Actions workflows of your Deutsche Cloud repositories. Keep `self-hosted` in the list for a
GitHub repository: a job without it may also run on GitHub's own machines.

## The sizes

| Label             | Machine                    | Where it runs                                                             |
| ----------------- | -------------------------- | ------------------------------------------------------------------------- |
| `dc-2x4`          | 2 vCPU, 4 GiB, Linux x64   | A pool of your organization, made the first time a job asks, at most 20   |
| `dc-4x8`          | 4 vCPU, 8 GiB, Linux x64   | The same, at most 16 machines; `deutsche-cloud` is another name for it    |
| `dc-8x16`         | 8 vCPU, 16 GiB, Linux x64  | The same, at most 10 machines                                             |
| `dc-16x32`        | 16 vCPU, 32 GiB, Linux x64 | The same, at most 10 machines; `deutsche-cloud-16` is another name for it |
| `dc-arm-2x4`      | 2 vCPU, 4 GiB, Linux ARM   | A pool of your organization, cloud machines, at most 20                   |
| `dc-arm-4x8`      | 4 vCPU, 8 GiB, Linux ARM   | The same, at most 16 machines                                             |
| `dc-arm-8x16`     | 8 vCPU, 16 GiB, Linux ARM  | The same, at most 10 machines                                             |
| `dc-arm-16x32`    | 16 vCPU, 32 GiB, Linux ARM | The same, at most 10 machines                                             |
| `dc-windows-4x16` | 4 vCPU, 16 GiB, Windows    | Your Windows pool on Azure, else the hosted Windows runner; a VM per job  |
| `dc-macos-m4`     | Mac mini (Apple M4), macOS | Your Macs, else the hosted macOS runner; a fresh macOS VM per job         |

The smallest Linux size is `dc-2x4` and the largest `dc-16x32`. A label that starts with `dc-` and
is not in this table (`dc-1x2`, `dc-32x64`) matches no runner: the job waits.

**Runners** in CI lists the same sizes, with **Copy runs-on** for each, the sizes your organization
has used, and what each one cost this month.

## How a size gets its machines

The first job of your organization that names a Linux size creates the organization's pool for it,
named after the label (`dc-16x32`). Every later job of that size, from any connected repository or
any of your repositories, runs on the same pool. A size pool:

- starts no machine while no job waits, and keeps a finished machine until its paid hour ends, for
  the next job;
- runs its x64 machines on Deutsche Cloud's own CI hosts first, and in the cloud when they are full;
  ARM machines are cloud machines;
- has no spending cap of its own: your organization's monthly cap on CI cloud spend covers all of
  its pools together (see [Cap cloud spend](cap-cloud-spend.md));
- is an ordinary runner pool of your organization: change its maximum, placement or cap like any
  other (see [Change or delete a runner pool](change-or-delete-a-runner-pool.md)).

Its creation is recorded in your audit log as `ci:CreateRunnerPool` by `system/runner-sizes`, with
the repository and job that asked.

**Important:**
Machines in the cloud are billed per started hour, like any runner pool. Your organization's monthly
cap is the bound on what all size pools spend together; without one, only each pool's maximum
number of machines limits it.

Deleting a size pool does not switch the size off: the next job that names it creates the pool
again. To stop one size, set the pool's maximum to 0 (see
[Turn a pool off](change-or-delete-a-runner-pool.md#turn-a-pool-off)): its jobs then wait, and a
GitHub job waits on GitHub until another of your runners takes it or you raise the maximum. To stop
all of them for a GitHub repository, remove its connection.

## Choose a size from what a job used

A job that ran on Deutsche Cloud's own CI hosts shows what its machine used: on the run page, the
job's line says how many of its vCPU it used on average and at its peak, and its memory peak. Hold
the pointer over it to see the job's last runs and, once it has three, which size suits it: a
smaller size when even its busiest runs leave most of the machine unused ("a 2-vCPU size would
fit"), or a larger one when it uses all of its cores ("an 8-vCPU size would run it faster"). The
advice is never applied for you: the label in your workflow decides the machine.

## Labels of your own pools

A label that starts with `dc-` belongs to this catalog. A pool you create may carry a size label
only when its machine size is that size (`dc-8x16` on an `s-8` pool); any other `dc-` label is
refused with 400. Pools made before the catalog keep their labels: `deutsche-cloud` and
`deutsche-cloud-16` are other names for `dc-4x8` and `dc-16x32`, so a job that names either reaches
the same pool, and that pool's runners carry both names.

## Related

- [Run the jobs of a GitHub repository on a runner pool](run-jobs-of-a-github-repository.md)
- [Create a runner pool](create-a-runner-pool.md)
- [Use hosted runners](use-hosted-runners.md)
- [Cap cloud spend](cap-cloud-spend.md)
