Skip to content
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

CI: Use buildjet to get faster builds #5393

Closed
wants to merge 3 commits into from
Closed

CI: Use buildjet to get faster builds #5393

wants to merge 3 commits into from

Conversation

danmar
Copy link
Owner

@danmar danmar commented Sep 1, 2023

No description provided.

@firewave
Copy link
Collaborator

firewave commented Sep 1, 2023

Every push you do on your repo is completely clogging the build pipeline for one hour because of the duplicated builds. Just using some a different runner is not going to improve that...

We should (temporally) merge #5377 to get at least rid of the duplicated workflows for now. I want to see if there is a different working approach but the current situation is unacceptable.

@firewave
Copy link
Collaborator

firewave commented Sep 1, 2023

Also as mentioned in the other ticket I don't think this will be of any major help since most of our bottlenecks are not with the build but anything else and those are almost all single-threaded in nature.

Also build times are quite erratic on GitHub in general so to do a proper comparison you need to do several builds and also make sure the caches are actually filled to make sure it will actually help. I had major issues in the past to actually confirming that some improvements I made were actual improvements.

@danmar
Copy link
Owner Author

danmar commented Sep 1, 2023

I have the feeling that we have too few runners. It should be possible to run to jobs in parallell.

@danmar
Copy link
Owner Author

danmar commented Sep 1, 2023

Right now this job has this statistics: 100 queued, 8 in progress, and 32 successful checks

So only 8 checks are executed in parallell. There are 100 checks that are not running right now they are waiting.

@firewave
Copy link
Collaborator

firewave commented Sep 1, 2023

I have the feeling that we have too few runners. It should be possible to run to jobs in parallel.

We run 20 jobs in parallel which is a lot. Since we have 60+ jobs - many of those because we support lots of build systems, EOL version and other stuff we should no longer support at all. I see almost 15 jobs we could just delete if we decide to drop support for outdated or EOL stuff.

@firewave
Copy link
Collaborator

firewave commented Sep 1, 2023

Right now this job has this statistics: 100 queued, 8 in progress, and 32 successful checks

So only 8 checks are executed in parallell. There are 100 checks that are not running right now they are waiting.

That is since there are other builds running and buildjet appears to provide less runners than GitHub. Also the 100+ jobs are because you trigger the push action in addition to pull_request because you create PRs from the root repo. That should not be the case.

@danmar
Copy link
Owner Author

danmar commented Sep 1, 2023

Also the 100+ jobs are because you trigger the push action in addition to pull_request because you create PRs from the root repo. That should not be the case.

so.. it would be faster if I stopped creating branches in the root repo? hmm.. thanks I had not thought of that.

@danmar
Copy link
Owner Author

danmar commented Sep 1, 2023

We run 20 jobs in parallel which is a lot.

I feel this is too little. If we can get more I would be interested to know how.. even if there are costs..

@firewave
Copy link
Collaborator

firewave commented Sep 1, 2023

Also the 100+ jobs are because you trigger the push action in addition to pull_request because you create PRs from the root repo. That should not be the case.

so.. it would be faster if I stopped creating branches in the root repo? hmm.. thanks I had not thought of that.

That should work. I have no idea why no other repos have that issue I did not yet have time to investigate fruther. I wanted to run some experiments but that doesn't work if the CI is overloaded. 🫤

@firewave
Copy link
Collaborator

firewave commented Sep 1, 2023

We run 20 jobs in parallel which is a lot.

I feel this is too little. If we can get more I would be interested to know how.. even if there are costs..

It's enough - believe me. Adding more runner won't help at all if you have staggered builds or one of the longer running jobs is triggered last (it seems there's no way to specify a priority).

Please take a look at the list I posted here for things that will help way more than just throwing money at it: #5377 (comment)

@danmar
Copy link
Owner Author

danmar commented Sep 1, 2023

It's enough - believe me. Adding more runner won't help at all if you have staggered builds or one of the longer running jobs is triggered last (it seems there's no way to specify a priority).

I want that all jobs are triggered directly. As you say.. in particular the longest running jobs must be triggered immediately.

@firewave
Copy link
Collaborator

firewave commented Sep 1, 2023

It's enough - believe me. Adding more runner won't help at all if you have staggered builds or one of the longer running jobs is triggered last (it seems there's no way to specify a priority).

I want that all jobs are triggered directly. As you say.. in particular the longest running jobs must be triggered immediately.

Well, if you have lots of money to spend/waste that can be achieved but not for much gain.

If you would set up a self-hosted runner that would be able to do that you need a Xeon or Epyc CPU with 64+ threads - those usually set you back a few thousand dollars just for the processor...using multiple smaller system might not be much cheaper - maybe even more expensive.

@danmar
Copy link
Owner Author

danmar commented Sep 1, 2023

Well, if you have lots of money to spend/waste that can be achieved but not for much gain.

I don't have infinite money.. but if we for instance could spend something like $100 per month to get a substantial improvement then I would like to know it.. preferably with some cloud solution rather than buying our own hardware..

@firewave
Copy link
Collaborator

firewave commented Sep 1, 2023

Well, if you have lots of money to spend/waste that can be achieved but not for much gain.

I don't have infinite money.. but if we for instance could spend something like $100 per month to get a substantial improvement then I would like to know it.. preferably with some cloud solution rather than buying our own hardware..

It won't be substantial in total. I recently had to get a new machine and the compilation speed up was huge but the files which compiled slow are still compiling slow. It was mainly because of the increased core count which help to chew through the smaller files. But everything else has not gotten much faster. You need to do optimizations.
I will file tickets for the points I made and link them in the other comment and give a few existing changes a short spin.

@danmar danmar closed this Sep 1, 2023
@firewave
Copy link
Collaborator

firewave commented Sep 4, 2023

Sorry for being so harsh but that's how I get when (major) changes just get dropped on top of it and there's still other ways to possibly reach the same goal. And even more so if those changes might infer with working on the other approaches.

Hopefully I will be able to file tickets for all my ideas/experiments in the next few days.

I really like it though that you are willing to back it up with more resources.

@danmar danmar deleted the ci-buildjet branch September 6, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants