Skip to content
BlogProduct Updates

Runner right-sizing: stop paying for capacity your jobs don't use

Avrea now suggests a smaller or larger runner for each job, based on the CPU, memory and disk its recent runs used, and gives you the label to switch to.

Tatu Mäkijärvi

Runner right-sizing: stop paying for capacity your jobs don't use

Avrea now tells you when a job is on a bigger runner than it needs, or one too small to keep up, and names the label to switch to. Suggestions come from the CPU, memory and disk your recent runs used, and they're on for every organization.

The 8-vCPU, 32-GB Linux x86 runner costs four times what the 2-vCPU, 8-GB runner does, $0.016 a minute against $0.004. If a job on the 8 vCPU runner averages a fifth of its CPU, you’re paying four times the 2 vCPU rate on every run for capacity that sits idle. Avrea now spots those jobs and tells you which label to move them to.

It works from the CPU, memory and disk a job’s recent successful runs used, compared with the capacity of the runner it ran on. A job that stays well under capacity on every resource gets a Size down suggestion with the smallest label it still fits, which can be several sizes down, 8 vCPU to 2 for example. A job whose memory or disk peaks near capacity, or whose CPU stays high on average, gets a Size up suggestion with the next size that has more of what ran out. A job needs three successful runs on a size before it gets either, and a job near a threshold isn’t bounced back and forth.

Job and run pages flag jobs that should size up or down and name a label when a suitable size is available. A full persistent disk is flagged separately; switching runners does not increase that disk’s capacity. For a whole workflow, choose Right-size in your repository’s Workflows tab and you get every job’s suggestion over the last day, 7 days or 30 days. Choose Right-size above the workflow list to review the whole repository. The API returns suggestions for one workflow or up to 200 workflows in one request; omit the workflow IDs to select active Avrea workflows automatically.

The Right-size view also has a ready-made prompt for your coding assistant. It lists each job’s current and suggested label and says to change runs-on and nothing else. Paste it in and review the change.

One thing to keep an eye on. The CPU check uses the average over the run, so a job that idles through a long download and then compiles on every core for a minute can come out a little slower on the smaller runner. If its duration grows after the switch, the runs on the new size get their own suggestion.

The thresholds, the API and the response format are in the runner right-sizing docs.

Start shipping with Avrea