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 suggestion] Add ALLOW_MAKE_JOBS_{NTASKS}=yes allowing multiple jobs only when the number of tasks is low enough #613

Open
yurivict opened this issue May 11, 2018 · 1 comment

Comments

@yurivict
Copy link
Member

yurivict commented May 11, 2018

The problem with the current ALLOW_MAKE_JOBS=yes is that it can kill the system when too many jobs are run by poudriere (each task is run on many CPUs). The problem with ALLOW_MAKE_JOBS=nois that it is (obviously) slow when the number of tasks gets low.

I suggest to add the variable ALLOW_MAKE_JOBS_{NTASKS}=yes. For example, ALLOW_MAKE_JOBS_1=yes would run the task on multiple CPUs when it starts as a single task. This should always be safe, and can improve the overall performance.

ALLOW_MAKE_JOBS_2=yes will run on multiple CPUs when the task starts among only 1 or 2 simultaneous tasks, etc. Since a task can finish and lead to multiple other tasks, this can lead to number of jobs >NCPU. This makes such option controversial for NTASKS>=2. But IMO this option can still be useful for NTASKS>=2 as long as its effects are documented.

This option, if implemented, would make poudriere job control more flexible.

@bdrewery
Copy link
Member

bdrewery commented Jun 4, 2018

I coded this up a while ago to allow using MAKE_JOBS when only 1 job is running, or to split it for 2 jobs. It was pretty invasive for what seemed like little benefit. https://github.com/freebsd/poudriere/compare/master...bdrewery:master-make-jobs-bottlenecked?expand=1 was the implementation. By invasive I just mean it added more complexity in the queue handling which is critical code to keep simple (it's already too complex).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants