WarpBuild LogoWarpBuild

How to Speed Up GitHub Actions: Measure What's Slow, Then Fix It

Why GitHub Actions jobs are slow and how to speed them up: a tested workflow that measures performance (CPU, disk, cache and queue time), with a fix for each.

How to Speed Up GitHub Actions: Measure What's Slow, Then Fix It cover

Updated November 2026. This guide first ran in November 2023. It's been rewritten with measured runner data, a diagnostics workflow you can run, and a fix for each bottleneck.

Key Takeaways

A slow GitHub Actions job on a GitHub-hosted Linux runner is usually limited by one of four things: core speed, the workspace disk, cache transfer or the wait for a runner. This guide gives you a workflow and a script that measure your job's performance and tell you which one, plus public numbers for GitHub's 2-, 4- and 8-core runners to read yours against. As of November 2026.

  • Record the CPU before you compare timings. GitHub's 2-core x64 label ran on six CPU models over three months, and its daily median single-core score ranged from 1,836 to 3,713. Two runs of the same commit can differ for that reason alone.
  • A bigger GitHub runner can have a slower core. The 8-core runner scored 2,375 to 2,891 single-threaded against 3,529 on the 4-core. Parallel steps get faster; a serial step like tsc or a linker can get slower.
  • Compare cost per build, not per minute. On one Rust build, the 8-core runner finished 1.9x faster than the 4-core for about the same cost per build ($0.044).
  • Count cores, not vCPUs. Running every thread gave 1.1x the work of one thread on the 2-core runner and 2.1x on the 4-core.
  • Measure queue time from the API, not the log. A job's wait is started_at minus created_at. GitHub's larger 8-core runner waited 1m 16s at the median in a 15-job burst; its standard runners waited 3s.

Is a Bigger GitHub Runner Faster?

Not always. GitHub's larger x64 runners add cores, disk speed and cache speed, but not a faster core: the 8-core runner's single core scored 18 to 33% below the 4-core's. A bigger runner speeds up parallel steps and does nothing for, or slows, serial ones.

Here is what RunsOn's public benchmark measured inside jobs on GitHub's x64 Linux runners between Oct 20 and Nov 4, 2026. RunsOn sells runners of its own; its harness and raw data are public, linked under each figure.

GitHub runner2-core (ubuntu-latest, private repos)4-core8-core
CPU the job reportedAMD EPYC 7763 (most days)AMD EPYC 9V45Intel Xeon 6973P-C or 8573C
Single-core score (PassMark)2,3063,5292,375 to 2,891
All threads vs one thread (sysbench)1.1x2.1x4.2x to 4.5x
Sequential disk read199 MiB/s394 MiB/s784 MiB/s
4 GB actions/cache restore1m 03s46s31s
Rust build steps (spotify-player)6m 41s3m 41s1m 59s
Price per minute$0.006$0.012$0.022
Rust cost per build$0.040$0.044$0.044

Sources: CPU, disk, cache, builds, prices. Cost per build = build-step minutes × price; GitHub bills each job rounded up to the whole minute, so billed cost is slightly higher.

Three things in that table aren't in GitHub's docs:

  • The 8-core runner's single core is the slowest of the three. Its Xeon scores 18 to 33% below the 4-core's EPYC. The Rust build still ran 1.9x faster because cargo keeps eight threads busy, but a step that runs on one thread gets no faster, or slower.
  • vCPUs aren't cores. Running every thread on the 2-core runner did 1.1x the work of one thread, so its second vCPU adds about 10%. The 4-core runner reached 2.1x.
  • The label doesn't pin the hardware. The 2-core label ran on six CPU models between Jul 27 and Nov 4, 2026, with daily median single-core scores from 1,836 to 3,713 (chart). Most days sat near 2,300, on the same AMD EPYC 7763 this post found in most runs when it first came out in 2023.

Larger runners start slower. In a burst of 15 jobs queued at once, GitHub's 2- and 4-core runners started at a median of 3s; the 8-core larger runner took 1m 16s (queue data). For short jobs, that wait can cancel the speed-up. Larger runners also need a Team or Enterprise Cloud plan.

Measure Your Own Runner

Two pieces: a workflow you trigger by hand with a compatible Ubuntu or Debian runner label, and a script that reads queue and run times for your real workflows from the API.

Prerequisites: a repository where you can add workflows and use the Actions cache; the GitHub CLI and jq on your machine for the script. Install the GitHub CLI on the runner for cache cleanup. The workflow uses actions/cache v6, which needs runner version 2.327.1 or later on self-hosted runners.

Add the diagnostics workflow

Save this as .github/workflows/runner-diagnostics.yml on your default branch. It prints the CPU model, cores, single-thread vs all-thread CPU speed, workspace disk speed and a 1 GiB cache round trip, then deletes the cache entry.

name: Runner diagnostics

on:
  workflow_dispatch:
    inputs:
      runner:
        description: Runner label to test (for example ubuntu-latest)
        required: true
        default: ubuntu-latest

permissions:
  actions: write # needed to delete the probe cache entry at the end
  contents: read

jobs:
  diagnose:
    runs-on: ${{ inputs.runner }}
    timeout-minutes: 15 # caps the cost if a step hangs
    env:
      PROBE_KEY: runner-probe-${{ github.run_id }}-${{ github.run_attempt }}
    steps:
      - name: Check cleanup tooling
        run: command -v gh

      - name: Install benchmark tools
        run: |
          sudo apt-get update -qq
          sudo apt-get install -y -qq sysbench fio zstd

      - name: CPU model and core count
        run: |
          lscpu | grep -E 'Model name|^CPU\(s\)|Thread\(s\) per core'
          echo "vCPUs (nproc):  $(nproc)"
          echo "Physical cores: $(lscpu -p=CORE,SOCKET | grep -v '^#' | sort -u | wc -l)"

      - name: Single-thread vs all-thread CPU
        run: |
          one=$(sysbench cpu --threads=1 --time=10 run | awk '/events per second/ {print $4}')
          all=$(sysbench cpu --threads="$(nproc)" --time=10 run | awk '/events per second/ {print $4}')
          echo "1 thread:         $one events/s"
          echo "$(nproc) threads:        $all events/s"
          awk -v a="$all" -v o="$one" 'BEGIN {printf "Speed-up over one thread: %.1fx\n", a / o}'

      - name: Workspace disk
        run: |
          # Sequential read, 1 MiB blocks: checkouts, archives, Docker layers
          fio --name=seq --filename=fio.tmp --size=2G --rw=read --bs=1M --iodepth=32 \
            --ioengine=libaio --direct=1 --output-format=terse --terse-version=3 \
            | awk -F';' '{printf "Sequential read: %d MiB/s\n", $7 / 1024}'
          # One 4 KiB random read at a time: cold file lookups, SQLite, package metadata
          fio --name=qd1 --filename=fio.tmp --size=2G --rw=randread --bs=4k --iodepth=1 \
            --ioengine=libaio --direct=1 --runtime=20 --time_based --output-format=terse --terse-version=3 \
            | awk -F';' '{printf "QD1 random read: %d IOPS\n", $8}'
          rm -f fio.tmp

      - name: Create a 1 GiB cache payload
        run: head -c 1G /dev/urandom > cache-probe.bin

      - name: Save cache
        uses: actions/cache/save@v6
        with:
          path: cache-probe.bin
          key: ${{ env.PROBE_KEY }}

      - name: Delete the local copy
        run: rm cache-probe.bin

      - name: Restore cache
        uses: actions/cache/restore@v6
        with:
          path: cache-probe.bin
          key: ${{ env.PROBE_KEY }}
          fail-on-cache-miss: true

      - name: Remove the probe from the repository's cache storage
        if: always()
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          cache_ids=$(gh cache list --repo "$GITHUB_REPOSITORY" --key "$PROBE_KEY" \
            --json id,key --jq ".[] | select(.key == \"$PROBE_KEY\") | .id")
          for cache_id in $cache_ids; do
            gh cache delete "$cache_id" --repo "$GITHUB_REPOSITORY"
          done

The non-default choices:

  • timeout-minutes: 15 caps the bill if apt-get or a fio run hangs. The timed steps take 40 seconds; installing packages, the 2 GiB disk read and the cache round trip add the rest.
  • --direct=1 on fio bypasses the page cache, so you measure the disk rather than RAM. Builds do use the page cache, so treat these as the disk's limits, not your build's speed.
  • A unique cache key per run forces a real save and restore every time. The last step deletes the entry so it doesn't use your repository's cache quota.

Run it once per label you want to compare:

gh workflow run runner-diagnostics.yml -f runner=ubuntu-latest

Compare runners by ratio, not against the table above. The workflow uses sysbench, not PassMark, so its absolute CPU numbers won't match the benchmark's. Run it on each label you're considering and compare the results to each other. Run each label at least three times; the hardware behind one label varies.

Step durations for the cache save and restore appear in the job's log; the run summary shows total job time.

Measure queue time from the API

The log starts when a runner picks the job up, so it never shows the wait. The API does: each job has a created_at (queued) and a started_at (picked up). This script reports the median and 90th-percentile wait and the median run time per runner label, over a workflow's last completed runs.

#!/usr/bin/env bash
# Queue wait and run time per runner label, from the last N completed runs of one workflow.
# Usage: ./queue-times.sh OWNER/REPO ci.yml [RUNS]
# Needs: gh (authenticated) and jq.
set -euo pipefail
repo=$1
workflow=$2
runs=${3:-50}

run_ids=$(gh run list --repo "$repo" --workflow "$workflow" --status completed \
             --limit "$runs" --json databaseId --jq '.[].databaseId')
for id in $run_ids; do
  gh api --paginate "repos/$repo/actions/runs/$id/jobs?per_page=100"
done | jq -s '
  def pct(p): sort | .[((length * p) | ceil) - 1];
  [ .[].jobs[]
    | select(.conclusion != "skipped" and .started_at != null and .completed_at != null)
    | {label: (.labels | join(",")),
       queue: ((.started_at | fromdateiso8601) - (.created_at | fromdateiso8601)),
       run:   ((.completed_at | fromdateiso8601) - (.started_at | fromdateiso8601))} ]
  | group_by(.label)
  | map({label: .[0].label,
         jobs: length,
         queue_p50_s: (map(.queue) | pct(0.5)),
         queue_p90_s: (map(.queue) | pct(0.9)),
         run_p50_s:   (map(.run)   | pct(0.5))})'

Run it on your busiest workflow:

./queue-times.sh your-org/your-repo ci.yml 50

It prints one object per label, with times in seconds:

[
  {
    "label": "ubuntu-latest",
    "jobs": 6,
    "queue_p50_s": 6,
    "queue_p90_s": 201,
    "run_p50_s": 240
  }
]

That example output is from test data, not a real repository. Skipped jobs are left out because they never wait for a runner.

Which Limit Is Slowing Your Job?

Find your slowest job, find its longest step, then match that step to a row. Fix the free column first; a bigger or different runner only helps the rows where the limit is hardware.

What your numbers showThe limitFree fixFix that costs money
The longest step is serial (tsc, a linker, one test worker) and the single-thread number is lowCore speedSplit the step into parallel jobs or shards; turn on incremental build cachesA runner with faster cores. On GitHub, the 4-core beats the 8-core here
The longest step is parallel (cargo build, make -j, sharded tests) and the all-thread speed-up is well below nprocReal cores, not vCPUsMatch parallelism to the speed-up you measured, not to nprocMore cores; compare cost per build on your job, not price per minute
Checkout, package install or docker build dominates, and sequential read is under about 400 MiB/sDiskfetch-depth: 1 where nothing needs history; cache the package manager's store, not node_modulesA runner with a faster workspace disk
Cache restore takes over about 15s per GB, or caches near GitHub's 10 GB per-repo limit get evictedCache transferSmaller, more specific cache paths and keys; split one large cache into severalA runner whose cache sits close to it
queue_p50_s over 30s, or queue_p90_s in minutesConcurrency cap or runner start-upconcurrency with cancel-in-progress: true; path filters; fewer matrix legsA higher GitHub plan, self-hosted runners, or a provider without per-plan caps

Reference points, all from the sources above:

  • Cache: GitHub's service restored 4 GB in 31s to 1m 03s depending on runner size, about 8 to 16 seconds per GB.
  • Queue: GitHub's standard runners started a 15-job burst at a 3s median. Plan caps are 20, 40, 60 and 500 concurrent jobs on Free, Pro, Team and Enterprise (limits), so a long wait on standard runners usually means you hit the cap.
  • Cache limit: 10 GB per repository at no charge, with entries evicted after 7 days unused (GitHub docs).

One run is a sample, not a measurement. The CPU behind a label varies from run to run. Run the diagnostics at least three times per label, and the queue script over at least 50 runs, before changing anything.

Other Ways to Speed Up GitHub Actions

These help on any runner, and you don't need measurements to start:

  • Run only what changed. Add paths filters to triggers, and build only affected packages in a monorepo (turbo --filter, nx affected); our monorepo guide covers the footguns.
  • Cancel superseded runs. A concurrency group with cancel-in-progress: true stops the old run when a new commit lands on the same branch.
  • Split long jobs. Shard tests across a matrix to cut wall-clock time. It uses more runner minutes, not fewer.
  • Key caches on the lockfile. Use hashFiles() on the lockfile so dependency changes select a new cache. Keep the install step when caching package downloads rather than installed dependencies.
  • Retry the network, not the job. Wrap package-registry and external API calls in retries with backoff, so one flaky download doesn't rerun the whole job.

When You Need Faster GitHub Actions Runners

If the free fixes are in and your longest step is still bound by core speed or disk, you need faster runners, not more tuning. WarpBuild runs the same jobs on runners with faster cores and a faster workspace disk, and the change is one label:

 jobs:
   build:
-    runs-on: ubuntu-latest
+    runs-on: warp-ubuntu-latest-x64-4x

On a private repository ubuntu-latest is 2 vCPU, so this diff also doubles the size. Use warp-ubuntu-latest-x64-2x to compare like for like.

The same public benchmark measured WarpBuild's 4 vCPU runner against GitHub's 4-core runner (Oct 22 to Nov 4, 2026):

x64 Linux, 4 vCPUGitHub 4-corewarp-ubuntu-latest-x64-4x
Single-core score (PassMark)3,5294,286
All threads vs one thread2.1x2.1x
Sequential disk read394 MiB/s4.6 GiB/s
4 GB actions/cache restore46s28s
Rust build, whole job3m 49s2m 23s
TypeScript build, whole job2m 31s1m 23s
Docker build, whole job15m 02s7m 37s
Price per minute$0.012$0.008
Cost per build (Rust / TypeScript / Docker)$0.046 / $0.030 / $0.180$0.019 / $0.011 / $0.061
Median start in a 15-job burst3s14s

Sources: builds and queue, CPU, disk, cache; WarpBuild prices. RunsOn's benchmark also measures other third-party providers: on each of these three builds, four or five of them finished faster than WarpBuild.

Before you switch, check it's the right fix:

  • If your jobs are short and start-up dominates, stay on GitHub's standard runners. They started 3s after queueing in the burst test; WarpBuild took 14s.
  • If the cache is your bottleneck, expect a modest gain. actions/cache on WarpBuild uses GitHub's cache service, so the 4 GB restore went from 46s to 28s, not to single digits. WarpBuild's caching docs recommend WarpBuilds/cache@v2 as a replacement for actions/cache@v4.
  • If you need many real cores, note the 4 vCPU runner has the same 2.1x all-thread speed-up as GitHub's. The gain comes from faster cores and disk; for more parallelism, pick a larger size.
  • If the repository is public and fits GitHub's free standard runners, free wins.

WarpBuild needs a GitHub organization, not a personal account. Setup is in the quick start.

Runner time is billed per minute at the label's rate. Cache storage and snapshot runners are billed separately; see pricing. The cost-per-build figures above are job time × price per minute, before whole-minute rounding.

FAQ

Does ubuntu-latest give me 2 or 4 vCPU?

On private repositories it's 2 vCPU and 8 GB; on public repositories it's 4 vCPU and 16 GB, per GitHub's hosted runner reference. The 2-core column in this post is the private-repository runner; the public 4 vCPU runner wasn't measured.

What does one diagnostics run cost?

It bills at your runner's per-minute rate, rounded up to whole minutes. On ubuntu-latest in a private repository that's $0.006 a minute; on a public repository's standard runner it's free.

Does the workflow run on self-hosted runners?

On Ubuntu or Debian runners where the job can run sudo apt-get. actions/cache v6 needs runner version 2.327.1 or later. Install gh on the runner for cache cleanup.

Can I test a faster runner without moving every workflow?

Yes, start with one slow job after setting up WarpBuild. Choose a compatible runner and compare repeated runs with the same commit, equivalent cache states, and similar CPU and memory allocations, including queue time and cost.

Why is my workflow still slow even when the cache hits?

A cache hit still requires downloading and unpacking files, and cached dependencies may still need installation or compilation. The caching guide explains dependency cache setup. Compare total job time with and without caching. If restoring the cache costs more than the work it saves, reduce what you cache.

What to Do Next

  1. Add runner-diagnostics.yml and run it three times on the label your slowest job uses.
  2. Run queue-times.sh on your busiest workflow over its last 50 runs.
  3. Open your slowest job, find its longest step, and match it to a row in the table.
  4. Apply the free fix and re-run both measurements.
  5. If the limit is still hardware, run the diagnostics on each candidate label and compare cost per build on your own job for a week before you move everything.

If your slowest step is bound by core speed or disk, run the diagnostics with -f runner=warp-ubuntu-latest-x64-4x and compare. Start free →

On this page