Auto size
Write runs-on: groundbox and we pick the size for each job: any even number of vCPUs from 2 to 16 (2, 4, 6, 8, 10, 12, 14 and 16), with 4 GB of memory per vCPU. You pay the per-minute price of the size the job ran at. A size between two of the fixed sizes costs in between: 6 vCPU costs halfway between 4 and 8 vCPU.
jobs:
test:
runs-on: groundbox- The size is decided before the job starts, from what its earlier runs used. It does not change while the job runs.
- A job with no measured runs starts at 4 vCPU. A job that ran on a fixed label before starts at the size it had there.
- It moves up when its cores were busy or its memory was over three quarters full in two of its last three runs. Busy cores move it up by half. Memory moves it straight to a size with enough.
- It moves down when its last five runs fit well inside a smaller size, straight to that size, but never below half in one move. The line to move down is well under the line to move up, so it does not go back and forth.
- It does not go back to a size it ran out of memory on.
- The largest size is 8 vCPU unless you raise it in the team settings, on every plan. The jobs list and the job's page show the size picked and why.
- A job is known by its repository, workflow name and job name. Rename it and it starts again.
- The labels with a size in the name work as before.
See and change it from the CLI
groundbox ci auto lists the auto jobs of the repo checked out here (--all for every repo): the label, the size picked, the rule and why, the runs counted, average and peak CPU and memory, and the price a minute.
groundbox ci auto
groundbox ci auto --max 16 # the largest size auto may pick for the team--max takes an even number from 2 to 16. It is the same setting as the dashboard's. An API key needs ci:read to list and ci:write to set it. The API: GET /v1/ci/auto, GET /v1/ci/auto/settings and PUT /v1/ci/auto/settings. The SDKs have get_ci_auto_sizes and set_ci_auto_max. The MCP server only reads it, with the ci_stats tool's auto_sizes action.
See a job over time
The dashboard's Jobs page is every CI job in one list: how its last run went, its time over its last runs, how often it fails, the runner it gets with a small chart of that size over time, the cores and memory it uses, and its cost a week. Open a job to see it run by run: each run's time and result, the runner size against the cores and memory each run used, why the job has the size it has, and each change of size with the reason. Click a run in any chart to open it.
groundbox ci insights --job NAME # in the repo's checkout
groundbox ci insights --repo OWNER/NAME --workflow CI --job NAME --days 90The API is GET /v1/ci/insights/job?repo=&workflow=&job= (ci:read): the job's finished runs, oldest first, at most 60, and its changes of size. The SDKs have get_ci_job_history. For auto jobs alone, groundbox ci auto --job ID and GET /v1/ci/auto/{id} give the same history by the job's id.
Jobs that wait at the same time
GitHub gives a waiting job to any idle runner that has the job's labels. It has no way to keep a runner for one job. So jobs with runs-on: groundbox that wait at the same time can take each other's runner. To keep every job on at least the size it needs, all of an organization's groundbox jobs run at one size: the largest any of them needs. For a personal account it is per repository.
To run a job at exactly its own size, give it a label of its own: groundbox-auto-tests, with any name you like after groundbox-auto-. Its runners carry only that label, so only that job takes them, and it takes no other job's runner.
jobs:
lint:
runs-on: groundbox-auto-lint
tests:
runs-on: groundbox-auto-tests- Use a different name for each job. Jobs that share a name, like the jobs of a matrix, share runners and so one size.
- If a job does land on a runner picked for another job, it is billed at the size of the runner it ran on, and the run counts toward its own history.
- A label that has run lately gets a warm runner at its size while your team is running jobs, so its next job starts in about a second. A new label, or one that has not run lately, waits a few seconds for its runner.
groundbox ci autoshows which labels have one.