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

feature request: Redistribute the idle CPU cores (jobs per builder) among the remaining builders #124

Open
Ximalas opened this issue Apr 21, 2018 · 2 comments

Comments

@Ximalas
Copy link
Contributor

Ximalas commented Apr 21, 2018

When builders are placed in shutdown, try to redistribute the idle CPU cores (jobs per builder) among the remaining builders to speed up building of the remaining packages.

@vasi
Copy link

vasi commented Mar 28, 2024

It ought to be possible using the jobserver feature of make, which is the same thing that allows recursive make to work. See the great description of how GNU make does this.

Unfortunately, bsdmake just has a -J option which is documented as "private". The actual format isn't hard to discover. Plausibly if we set MAKEFLAGS to include "-J X,Y" for bsdmake, and "--jobserver-auth X,Y" for GNU make, they'd inherit that and we could share a max number of jobs across all builders.

@jrmarino
Copy link
Owner

no, that's mixing topics. Synth allocates cpu jobs to each build. For example. lets say it has 4 builders with 3 jobs each. Each builder is limited to 3 jobs, no matter if it has 64 cpus available.

The original poster is saying, "hey, you allocate 12 totals jobs (amongst 4 builders), so if only 2 builders are active, allocate 6 jobs to each of them".

The second suggestion is based on GNU make which is a fraction of the builds. Many ports don't use make at all. Many more use BSD make over GNU make.

Unless told not to, Synth passed -j to both make and gnu make to limit the jobs it spawns.

I guess technically the original request wouldn't be impossible to do. It's just that I'm not actively developing synth anymore. I did some rare work yesterday to support subpackages so it's basically in maintenance mode.

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

No branches or pull requests

3 participants