Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

GitHub Engineering 5 min read Case study mediumAdept

How we tripled max concurrent jobs to boost performance of GitHub Actions

GitHub Actions on GitHub Enterprise Server went from 2,200 to 7,000 max concurrent jobs on 96-core machines between GHES 3.2 and 3.6 through three main fixes. A hot path for workflow secrets and callback URLs had silently never used its cache, which only showed up in profile traces. Orchestration state moved from a single growing blob column to a per-event table with incremental reads and writes, cutting orchestration CPU by about 50%. Postback load to the Rails checks service was reduced by deferring step updates until run completion and removing duplicate completion events, with a message queue planned to replace the multi-hop HTTP delivery.

Assumes: relational database schemasprofiling basicsdurable workflow orchestration

Related posts

  • How GitHub uses GitHub Actions and Actions larger runners to build and test GitHub.com

    GitHub Engineering mediumAdept

    GitHub moved CI for GitHub.com to GitHub Actions on larger runners, peaking at about 4,500 concurrent 32-core runners, 15,000 jobs per hour and 150,000 cores. Custom VM images that pre-bundle tools and a cached build of the project source, refreshed several times a day through an API, cut workflow time from about 50 to 12 minutes. Reusable workflows keep CI configuration and runner selection central across repositories, and reusing results when Git tree IDs match skips 300-500 runs a day. Isolated runners reach private VPC services through an OIDC-token-validating remote access gateway, whose scaffolding is open-sourced.

  • How we improved push processing on GitHub

    GitHub Engineering mediumAdept

    GitHub replaced RepositoryPushJob, a single sequential background job that ran over 60 push-handling tasks from 20 services, with a Kafka push event fanned out to roughly 16 independently owned, parallel jobs. The monolithic job was hard to retry because different tasks had conflicting retry needs. Its tight coupling meant a failure early in the job, such as in the Pushes MySQL cluster, could block unrelated work like pull request sync, and its sequential design added latency. The migration needed a reliable Kafka publisher, dedicated worker pools, finer observability and per-event feature flags for a safe rollout. Afterward, p50 pull request sync time fell from about 3s to 2s, ownership spread to 15+ teams, and fully processed pushes rose from 99.897% to at least 99.999%.

  • Simple trick to save environment and money when using GitHub Actions

    Turso mediumAdept

    GitHub Actions keeps running workflows for outdated pull request commits until they finish or fail. That wastes runner time, money on private repos, and quota on open source ones. Adding a `concurrency` block keyed on workflow name and PR number (falling back to the ref) with `cancel-in-progress: true` makes GitHub cancel stale runs when a PR is updated. In the first week after this change, 56 runs were cancelled in the LibSQL repository.

  • Monitor your CI performance using Sentry

    Sentry mediumAdept

    Sentry's tracing model can represent GitHub Actions workflows as traces, with each job's steps as spans, so slow steps and run-to-run variance show up the same way they would for an API request. Applied to the Sentry .NET SDK's macOS build job, it showed the Build step taking about 44 of 83 minutes. Better caching across runs and parallelized tests cut the job to about 24 minutes, a 71% reduction, and custom dashboards tracking p50/p90 showed overall workflow runs about 64% faster. Setup takes a Sentry project, a private `.sentry` repo with a `sentry_config.ini` holding the DSN, and an experimental GitHub App that reads Actions metadata. Ingested jobs count against your span quota.

  • Building an Auto-Scaling Lambda based on Github's Workflow Job Queue

    ClickHouse mediumAdept

    ClickHouse replaced CloudWatch-alarm-based EC2 Auto Scaling for its self-hosted GitHub Actions runners with a Lambda that reads the workflow job queue, built from GitHub webhook events stored in ClickHouse, and sets desired capacity directly. The Lambda compares current runners against in-progress and queued jobs, then scales up by roughly deficit/5 and down by reserve/2. The old rule (add a runner after 5 minutes above 97% busy) took hours to warm up groups of 50+ runners. The new approach launches jobs faster, saves compute when load drops, and keeps busy and active runner counts much more closely aligned.

The quest for software engineering knowledge.

Look:
Layout: