CI: runner has capacity=1 — increase to allow parallel jobs (deploy.yml spawns 4 at once) #498

Closed
opened 2026-06-06 16:22:47 +00:00 by guettlibot · 0 comments
guettlibot commented 2026-06-06 16:22:47 +00:00 (Migrated from codeberg.org)

Problem

The Forgejo act-runner is configured with a single job slot (capacity=1). All jobs — ci.yml, deploy.yml sub-jobs, website.yml, renovate.yml — queue behind each other on a single lane.

deploy.yml intentionally spawns 4 parallel jobs (check-changes, deploy-playstore, deploy-apk, build-linux) but with capacity=1 they execute one-by-one. The parallelism designed into the workflow is lost.

Measured queue times today:

  • Median: ~0.5 min (when runner is free)
  • p90: ~9.5 min
  • Burst peak: 38–40 min (when 7+ ci.yml runs pile up)

The website.yml hourly job waited 18 min just to run a 20-second task.

Fix

On the runner host, update /etc/forgejo/config.yml (or equivalent):

runner:
  capacity: 4   # was: 1

With capacity=4:

  • deploy.yml's 4 parallel jobs actually run in parallel (~30 min wall-clock instead of ~120 min sequential).
  • ci.yml bursts of commits reduce queue time by 4×.
  • website.yml no longer waits behind a long-running deploy.

Caveat

The remote Dagger engine is the shared compute backend. With capacity=4, up to 4 jobs connect simultaneously to the Dagger engine. Check that the engine host has enough CPU/RAM for concurrent Dagger pipelines before increasing capacity. A value of 2 is a safe starting point.

Expected impact

  • deploy.yml wall-clock time: ~30 min → ~30 min (same), but no longer blocking ci.yml for that entire time.
  • ci.yml burst queue time: 40 min → 10 min at capacity=4.
  • website.yml no longer starved behind deploy jobs.

Where to change

On the act-runner host:

  • /etc/forgejo/config.yml (or wherever the runner daemon config lives)
  • Restart the forgejo-runner service after the change.
## Problem The Forgejo act-runner is configured with a single job slot (capacity=1). All jobs — ci.yml, deploy.yml sub-jobs, website.yml, renovate.yml — queue behind each other on a single lane. deploy.yml intentionally spawns 4 parallel jobs (check-changes, deploy-playstore, deploy-apk, build-linux) but with capacity=1 they execute one-by-one. The parallelism designed into the workflow is lost. Measured queue times today: - Median: ~0.5 min (when runner is free) - p90: ~9.5 min - Burst peak: 38–40 min (when 7+ ci.yml runs pile up) The website.yml hourly job waited 18 min just to run a 20-second task. ## Fix On the runner host, update /etc/forgejo/config.yml (or equivalent): ```yaml runner: capacity: 4 # was: 1 ``` With capacity=4: - deploy.yml's 4 parallel jobs actually run in parallel (~30 min wall-clock instead of ~120 min sequential). - ci.yml bursts of commits reduce queue time by 4×. - website.yml no longer waits behind a long-running deploy. ## Caveat The remote Dagger engine is the shared compute backend. With capacity=4, up to 4 jobs connect simultaneously to the Dagger engine. Check that the engine host has enough CPU/RAM for concurrent Dagger pipelines before increasing capacity. A value of 2 is a safe starting point. ## Expected impact - deploy.yml wall-clock time: ~30 min → ~30 min (same), but no longer blocking ci.yml for that entire time. - ci.yml burst queue time: 40 min → 10 min at capacity=4. - website.yml no longer starved behind deploy jobs. ## Where to change On the act-runner host: - /etc/forgejo/config.yml (or wherever the runner daemon config lives) - Restart the forgejo-runner service after the change.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guettli/sharedinbox#498