Skip to content

[Warning] High Utilisation of GitHub Runners #17914

Closed
apache/nuttx-apps
#3449

Description

@lupyuen

Description / Steps to reproduce the issue

Our usage of GitHub Actions Runners has hit 70 Full-Time Runners over the past 12 hours. Remember that ASF Infra Team has demanded that we keep this Under 25 Full-Time Runners, or we might lose access to GitHub Actions CI.

https://infra-reports.apache.org/#ghactions&hours=12&limit=15&group=name

Image

I'm not sure whether this is due to high volume of PRs in NuttX Repo or NuttX Apps. Or possibly some runaway jobs? Let's continue to monitor this, hope it will drop within the next few days.

The URL above is accessible to NuttX PMC Members (possibly to NuttX Maintainers too). Other folks may use this simpler metric for monitoring: https://lupyuen.github.io/nuttx-metrics/github-fulltime-runners.png

I'm travelling overseas for a Marathon Race, my response will be slow. Thanks!

FYI: This is how we redesigned NuttX CI, 13 months ago: https://lupyuen.org/articles/ci3


Update: I have new videos that explain GitHub Runners and why we're using so many of them, also potential solutions...

GitHub Runners Usage up to 8 Mar 2026:

https://docs.google.com/spreadsheets/d/1JH7BCwTB-U6dwvSsy0tfpNXr534jVX-XYkOYi3FLM8g/edit?gid=0#gid=0

Image

(Generated by history.sh)

Based on the data from above, we have identified the following PRs as the Most Expensive PRs, in terms of GitHub Runner Usage. We need to study further why these PRs are consuming so many resources, and whether improving our NuttX Dev Process will fix this problem...

Which were generated by...

git clone https://github.com/lupyuen/nuttx-github-jobs
cd nuttx-github-jobs
./dump-github-jobs.sh
cargo run

## Import nuttx-github-jobs.tsv into Google Sheets for analysis:
## NuttX GitHub Jobs Spreadsheet: https://docs.google.com/spreadsheets/d/1HY7fIZzd_fs3QPyA0TX7vsYOjL86m1fNOf1Wls93luI/edit?gid=1187577522#gid=1187577522
## Most Expensive PRs: https://docs.google.com/spreadsheets/d/1HY7fIZzd_fs3QPyA0TX7vsYOjL86m1fNOf1Wls93luI/edit?gid=70515654#gid=70515654
Image

Over the Past 12 Months: NuttX Repo consumed 84% of GitHub Runners, while NuttX Apps Repo consumed 12%...

Image

What about the past 4 months? The distribution is the same: 84% vs 12%. Interesting note: Within the past 4 months, we consumed Half of The Entire Year's GitHub Runners.

Conclusion: It's definitely worth the effort to do Dependency Analysis and speed up the CI Builds for NuttX Repo. I thought NuttX Apps might take more GitHub Runners (because every CI Build takes 3.5 hours), but I proved myself wrong today.


On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Ubuntu on GitHub Actions

NuttX Version

master

Issue Architecture

[Arch: all]

Issue Area

[Area: Other]

Host information

No response

Verification

  • I have verified before submitting the report.

Activity

  1. added
    Type: Bug
    on Jan 14, 2026
  2. added
    Arch: all
    OS: Linux
    on Jan 14, 2026
  3. simbit18 commented on Jan 15, 2026

    @simbit18
    Contributor

    Thank you so much @lupyuen !

    @acassis @cederom @linguini1 @raiden00pl @xiaoxiang781216 @Donny9 @fdcavalcanti @tmedicci @wangchdo @xuxin930 @extinguish @CV-Bowen @zhhyu7 @GUIDINGLI @hujun260 @no1wudi @anchao

    I believe it is necessary to slow down/block PR for a few days, otherwise we may lose access to GitHub Actions CI..

    #14376

  4. acassis commented on Jan 15, 2026

    @acassis
    Contributor

    @lupyuen @SiM, is there some way we could create distributed CI buildings to relieve (alleviate) the runners pressure?

  5. raiden00pl commented on Jan 15, 2026

    @raiden00pl
    Member

    Is it possible to temporarily disable PRs in GH? I'm afraid that not everyone follows the GH notifications and mailing list, especially since in recent weeks these has been flooded with changes from Xiaomi

  6. simbit18 commented on Jan 15, 2026

    @simbit18
    Contributor

    Hi @xiaoxiang781216, Could you kindly inform the Xiaomi developers of the current situation so that they temporarily suspend the addition of new PRs?

  7. linguini1 commented on Jan 15, 2026

    @linguini1
    Contributor

    We're going to need to come up with a more permanent solution again soon.

  8. acassis commented on Jan 15, 2026

    @acassis
    Contributor

    @simbit18 yes, maybe they can focus on fix the existing PRs that are in development and coordenate between them to only do git push after previos PR finish the CI

  9. simbit18 commented on Jan 15, 2026

    @simbit18
    Contributor

    Hi @acassis, the problem is that we have exceeded 25 full-time runners and are now at 54, so we should stop.

  10. acassis commented on Jan 15, 2026

    @acassis
    Contributor

    @linguini1 seems like we are in a stage similar to what Greg was facing when he are doing "CI" in machine. We thought that after moving to Apache Foundation all our problems will be fixed, this is very disappoint.

    I think they should allows to use more than 25 runners, because this is the amount allowed to all projects, even projects that are not active anymore. It should be better to redistribute it between active projects (maybe the situation is a little different than what I'm seeing, but who knows?)

    Maybe we will need to run local machines to do the CI and just send the result to github, but since our user base is small I don't know if we will have enough computing power this way

  11. lupyuen commented on Jan 15, 2026

    @lupyuen
    MemberAuthor

    Maybe this will help: I see our devs pushing updated commits, which re-runs the build, and wastes GitHub Runners. (Pic below)

    Could we ask our devs to wait for the PRs to finish the builds in their own NuttX Repos, before submitting the PR? Remember that the builds in their own NuttX Repos, won't count towards our quota for GitHub Runners. Thanks!

    Image
  12. linguini1 commented on Jan 15, 2026

    @linguini1
    Contributor

    @linguini1 seems like we are in a stage similar to what Greg was facing where he are doing "CI" in machine. We thought that after moving to Apache Foundation all our problems will be fixed, this is very disappoint.

    I think they should allows to use more than 25 runners, because this is the amount allowed to all projects, even projects that are not active anymore. It should be better to redistribute it between active projects (maybe the situation is a little different than what I'm seeing, but who knows?)

    Maybe we will need to run local machines to do the CI and just send the result to github, but since our user base is small I don't know if we will have enough computing power this way

    I agree it would be nice if resources were redistributed, but I think we can still get a little more clever with our CI. I remember Lup made some really big improvements before. For instance, now we don't run a full build on every documentation change, just a docs rebuild.

    I wonder if we can try to do something similar again. Ex: changes to documents under arm/rp2040 only perform builds of rp2040 boards. It's going to be hard to do that for everything but it might be a better option than self hosting?

    Also, I wonder if we can cut down on "duplicate" boards in the regular CI. As in, it's not necessary to test a rebuild of every SMT32H7 board when there's a change, just one should be fine in most cases.

  13. acassis commented on Jan 15, 2026

    @acassis
    Contributor

    @lupyuen is there some way to force Github to post pone (ignore momentarily) the new PR build? I think it will difficult to user wait the right moment to push their PRs.

  14. acassis commented on Jan 15, 2026

    @acassis
    Contributor

    @linguini1 seems like we are in a stage similar to what Greg was facing where he are doing "CI" in machine. We thought that after moving to Apache Foundation all our problems will be fixed, this is very disappoint.
    I think they should allows to use more than 25 runners, because this is the amount allowed to all projects, even projects that are not active anymore. It should be better to redistribute it between active projects (maybe the situation is a little different than what I'm seeing, but who knows?)
    Maybe we will need to run local machines to do the CI and just send the result to github, but since our user base is small I don't know if we will have enough computing power this way

    I agree it would be nice if resources were redistributed, but I think we can still get a little more clever with our CI. I remember Lup made some really big improvements before. For instance, now we don't run a full build on every documentation change, just a docs rebuild.

    I wonder if we can try to do something similar again. Ex: changes to documents under arm/rp2040 only perform builds of rp2040 boards. It's going to be hard to do that for everything but it might be a better option than self hosting?

    Also, I wonder if we can cut down on "duplicate" boards in the regular CI. As in, it's not necessary to test a rebuild of every SMT32H7 board when there's a change, just one should be fine in most cases.

    Yes, we discussed this idea with @lupyuen in the past: if a PR is only modifying an specific board it doesn't make sense to test all other boards of the same arch. And if only a chip from a specific arch is modified it doesn't make sense to test all ARM boards.

    But I think these rules are difficult to implement on our CI. Maybe we need to rethink our CI from scratch

  15. 59 remaining items

  16. cederom commented on Jan 29, 2026

    @cederom
    Contributor

    Our approach with @lupyuen is Distributed Automated Build and Runtime Testing for NuttX, so build and runtime tests is connected. Lup has some very nice public articles already about NuttX Dashboard and PR Bot (https://lupyuen.github.io/), all this can be used already to setup local build host and report build results in form of comments to PRs. This seems safest possible choice for now without actual integration with our project's CI otherwise that would require constant full time (security) monitoring as Lup mentioned. No matter how I wish I cannot focus on this 108% right now sorry :-(

    So far we may try to use @raiden00pl NTFC as proposed in apache/nuttx-testing#102 :-)

    Whatever works that would help in local testing first before changes are submitted. On the other hand most users treat our upstream CI as their testing playground.. and as already mentioned we cannot blame them because NuttX is really big project and this is just easiest and cheapest way for them (and problem for us).

    I have just asked ASF Infra to create apache/nuttx-nxdart and apache/nuttx-ntfc so we can start testing the solutions outside already overloaded apache/nuttx repo.

  17. cederom commented on Jan 29, 2026

    @cederom
    Contributor
  18. fdcavalcanti commented on Jan 29, 2026

    @fdcavalcanti
    Contributor

    I think a joint development using ntxbuild with NTFC could lead to a major CI refactor but that should simplify improvement and even deployment to local testing.
    NTFC triggers Pytest while ntxbuild builds can execute the build. We can add features to ntxbuild such classes for managing defconfigs and boards.

  19. acassis commented on Jan 30, 2026

    @acassis
    Contributor

    @lupyuen @simbit18 something effective we can do now: we should keep the CI running if Check is failing, i.e.:

    ❌ Missing git commit message
    Used config files:
    1: .codespellrc
    Some checks failed. For contributing guidelines, see:
    https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md
    Error: Process completed with exit code 1.

    This is happening all the time and will spend runners and force the dev to start again

  20. cederom commented on Jan 30, 2026

    @cederom
    Contributor

    So the check should terminate all other jobs until guidelines and spelling are met right? :-)

  21. linguini1 commented on Jan 30, 2026

    @linguini1
    Contributor

    So the check should terminate all other jobs until guidelines and spelling are met right? :-)

    Yes, I think this is reasonable

  22. lupyuen commented on Feb 5, 2026

    @lupyuen
    MemberAuthor

    Good News: Over the past week we used 24 Full-Time GitHub Runners. Which is below the ASF limit of 25 Full-Time GitHub Runners. (Explained here)

    https://infra-reports.apache.org/#ghactions&hours=168&limit=15&group=name

    Image

    So we'll close this issue for now. As always: Everyone can monitor the Live Usage here: https://lupyuen.github.io/nuttx-metrics/github-fulltime-runners.png

    Has this overuse happened before?

    We see brief spikes in usage of GitHub Runners during NuttX Releases. But Jan-Feb 2026 was the busiest sustained peak...

    https://docs.google.com/spreadsheets/d/13QOAzC84eUYcB7xmPT0lo5L-VXnvY5cRvA9rmqC8utM/edit?gid=0#gid=0

    Image

    (Generated by history.sh)

    Why has the GitHub Load jumped significantly since 9 Dec 2025?

    Maybe something we changed in NuttX CI? Needs more monitoring and analysis (during the quieter Lunar New Year holidays)

    Lesson Learnt: Continuous Operational Monitoring of NuttX CI is super important! Even after revamping NuttX CI into a Distributed Build + Test system.

    (Update: This Sep 2025 build consumed 30 hours of GitHub Runners... Very similar to Feb 2026)

    What happened when we're using too many GitHub Runners?

    Few days ago: Some of our CI Jobs were stuck forever with this message:

    https://github.com/apache/nuttx/actions/runs/21600990965/job/62279838438

    Job is waiting for a hosted runner to come online.
    Job is about to start running on the hosted runner

    We were hurting Other Apache Projects too, because GitHub Runners are pooled across All Apache Projects.

    Suppose we have an idea for reducing the CI Load. How many GitHub Runners will it actually save?

    Check the "Total Run Time" in the GitHub Actions Log. A Typical CI Build will require 28 Hours of GitHub Runners...

    https://github.com/apache/nuttx/actions/runs/21365186482/usage

    Screenshot 2026-01-27 at 8 13 46 AM

    Suppose we propose to optimise the Doc Build. A Doc Build requires 1.5 minutes of GitHub Runners...

    https://github.com/apache/nuttx/actions/runs/21378476592/usage

    Screenshot 2026-01-27 at 8 09 59 AM

    So Doc Builds take up less than 0.1% of the GitHub Runners of a Typical CI Build. Which means that the optimal Doc Build probably won't reduce by much the GitHub Runners.

    Also remember: Fixing NuttX CI is highly risky. It might break the frequent CI Builds and/or NuttX Release Process. Someone needs to standby 24 x 7 to watch over the CI Fix, in case it goes haywire and needs to be rolled back ASAP.

    How should we revamp NuttX CI?

    I have no idea, though we have plenty of data to guide us. Please confirm later whether btashton / @simbit18 / @lupyuen are keen to take on the job. NuttX CI is super stressful and exhausting, some of us might not wish to continue the job e.g. due to health reasons. (I have hypertension)

  23. simbit18 commented on Feb 5, 2026

    @simbit18
    Contributor

    Hi @lupyuen, thank you so much for your incredible work.
    As you already said, every new idea to improve CI must consider the impact and (I would add) be tested first on a repository other than apache/nuttx to assess whether it is worthwhile. The same applies to Docker images.
    Anyway, I'm rooting for you in the next marathon! :)

  24. added a commit that references this issue on Apr 15, 2026
  25. linked a pull request that will close this issueCI: Retry build upon failure #18576on Apr 15, 2026
  26. linked a pull request that will close this issueCI: Retry build upon failure #18576on Apr 15, 2026
  27. added a commit that references this issue on Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: allOS: LinuxType: Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions