-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit the number of concurrent Google Cloud jobs #4857
Comments
This caused a critical PR #4918 to fail, so it is now a high priority fix:
https://github.com/ZcashFoundation/zebra/runs/7963813194?check_suite_focus=true#step:6:78 |
@gustavovalverde just letting you know that I increased the priority of this DevOps fix, because it's causing CI failures on critical Zebra PRs. |
This has caused failures on multiple critical-priority PRs, so it is now a critical-priority fix:
https://github.com/ZcashFoundation/zebra/runs/8061348032?check_suite_focus=true#step:7:82 |
Previous behavior: Multiple Mainnet full syncs were able to run on the main branch at the same time, and pushing multiple commits to the same branch would run multiple CI workflows, when only the run from last commit was relevant Expected behavior: Ensure that only a single CI workflow runs at the same time in PRs. The latest commit should cancel any previous running workflows from the same PR. Solution: Use GitHub actions concurrency feature https://docs.github.com/en/actions/using-jobs/using-concurrency Fixes #4977 Fixes #4857
PR #4891 partially fixes this issue by:
|
* ci(concurrency)!: run a single CI workflow as required Previous behavior: Multiple Mainnet full syncs were able to run on the main branch at the same time, and pushing multiple commits to the same branch would run multiple CI workflows, when only the run from last commit was relevant Expected behavior: Ensure that only a single CI workflow runs at the same time in PRs. The latest commit should cancel any previous running workflows from the same PR. Solution: Use GitHub actions concurrency feature https://docs.github.com/en/actions/using-jobs/using-concurrency Fixes #4977 Fixes #4857 * docs: typo * ci(concurrency): do not cancel running full syncs Co-authored-by: teor <teor@riseup.net> * fix(concurrency): explain the behavior better & add new ones Co-authored-by: teor <teor@riseup.net>
Motivation
When we're running a lot of GitHub workflows at the same time, we can hit CPU limits or other quotas in Google Cloud.
For example, one of the limits is 500 CPUs.
Suggested Fix
I think the limit calculation is roughly:
500 quota / 16 CPUs per machine - 4 CD instances = 25 job concurrency limit
500 quota / 16 CPUs per machine / 4 jobs launched simultaneously per workflow - 1 CD "workflow" = 6 workflow concurrency limit
But the limits might only be 12 jobs or 3 workflows, if each core counts as 2 quota CPUs.
The text was updated successfully, but these errors were encountered: