Skip to contentSkip to conversation

feature request: avoid getting the server stuck because of high "-j" value

DISCUSSION Gianfranco Costamagna 4 participants 6 messages Aug 4, 2017 – Aug 24, 2017 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hello Yocto developers!

recently I found a really nice make feature, that tunes at runtime the number of parallel execution jobs, according to the current system load [1].

I think such a feature would be really nice on server were multiple yocto builds are run in parallel, and when people forgets to put the correct number of parallel build jobs.

E.g., a number around CPU+1 is nice, but sometimes CPU*2 gives better results. Unfortunately if somebody else starts a build in parallel, that CPU*2 locks really hard the server, specially when building qt-based projects (e.g. qtbase, qtwebengine).

Tuning such value at runtime will probably end in faster compilation time and lower swapping on remote servers.
(I would think also to something that checks the amount of free RAM)

is such a feature feasible?

[1] https://www.gnu.org/software/make/manual/html_node/Parallel.html#Parallel

thanks,

Gianfranco

#2 lore raw

[feature request] avoid getting the server stuck because of high "-j" value

Hello Yocto developers!

recently I found a really nice make feature, that tunes at runtime the number of parallel

execution jobs, according to the current system load [1].

I think such a feature would be really nice on server were multiple yocto builds are run in parallel,

and when people forgets to put the correct number of parallel build jobs.

E.g., a number around CPU+1 is nice, but sometimes CPU*2 gives better results.

Unfortunately if somebody else starts a build in parallel, that CPU*2 locks really hard the server, specially

when building qt-based projects (e.g. qtbase, qtwebengine).

Tuning such value at runtime will probably end in faster compilation time and lower swapping on remote

servers.

(I would think also to something that checks the amount of free RAM)

is such a feature feasible?
should I open a bug for it?

[1] https://www.gnu.org/software/make/manual/html_node/Parallel.html#Parallel

thanks,

Gianfranco

#3 lore raw

Re: [feature request] avoid getting the server stuck because of high "-j" value

Quoted 7 lines · Gianfranco Costamagna

recently I found a really nice make feature, that tunes at runtime the number of parallel

execution jobs, according to the current system load [1].

I think such a feature would be really nice on server were multiple yocto builds are run in parallel,

Quoted 8 lines

and when people forgets to put the correct number of parallel build jobs.

E.g., a number around CPU+1 is nice, but sometimes CPU*2 gives better results.

Unfortunately if somebody else starts a build in parallel, that CPU*2 locks really hard the server, specially

when building qt-based projects (e.g. qtbase, qtwebengine).

If the cause of the slowdown with qt stuff is that RAM is fully utilized, and swap has to be taken into use, does checking load average help with that? My understanding is that it does not. You simply have to introduce per-recipe limits:

PARALLEL_MAKE_pn-qtwebengine = "-j 8"

Also, many projects are moving away from makefiles towards ninja build system, which does not have support for -l at all.

Alex

#4 lore raw

Re: [feature request] avoid getting the server stuck because of high "-j" value

In reply to Gianfranco Costamagna

It's not just feasible but you can do it right now.

PARALLEL_MAKE is the variable that sets how parallel the build should be. By default we pass -j<number of processors".

Just set it to -l2.5 or whatever load average you want.

Ross

Quoted 53 lines · Gianfranco Costamagna

Hello Yocto developers!

recently I found a really nice make feature, that tunes at runtime the number of parallel

execution jobs, according to the current system load [1].

I think such a feature would be really nice on server were multiple yocto builds are run in parallel,

and when people forgets to put the correct number of parallel build jobs.

E.g., a number around CPU+1 is nice, but sometimes CPU*2 gives better results.

Unfortunately if somebody else starts a build in parallel, that CPU*2 locks really hard the server, specially

when building qt-based projects (e.g. qtbase, qtwebengine).

Tuning such value at runtime will probably end in faster compilation time and lower swapping on remote

servers.

(I would think also to something that checks the amount of free RAM)

is such a feature feasible?
should I open a bug for it?

[1] https://www.gnu.org/software/make/manual/html_node/
Parallel.html#Parallel

thanks,

Gianfranco
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#5 lore raw

Re: [feature request] avoid getting the server stuck because of high "-j" value

Alex's comment is right that the semantics of PARALLEL_MAKE are GNU Make specific so you might find some recipes don't handle anything but there being -j values. You might have a little bit of fixing to do.

Ross

Quoted 67 lines · Ross

It's not just feasible but you can do it right now.

PARALLEL_MAKE is the variable that sets how parallel the build should be. By default we pass -j<number of processors".

Just set it to -l2.5 or whatever load average you want.

Ross

Quoted 53 lines · Gianfranco Costamagna

Hello Yocto developers!

recently I found a really nice make feature, that tunes at runtime the number of parallel

execution jobs, according to the current system load [1].

I think such a feature would be really nice on server were multiple yocto builds are run in parallel,

and when people forgets to put the correct number of parallel build jobs.

E.g., a number around CPU+1 is nice, but sometimes CPU*2 gives better results.

Unfortunately if somebody else starts a build in parallel, that CPU*2 locks really hard the server, specially

when building qt-based projects (e.g. qtbase, qtwebengine).

Tuning such value at runtime will probably end in faster compilation time and lower swapping on remote

servers.

(I would think also to something that checks the amount of free RAM)

is such a feature feasible?
should I open a bug for it?

[1] https://www.gnu.org/software/make/manual/html_node/Parallel.
html#Parallel

thanks,

Gianfranco
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#6 lore raw

Re: [feature request] avoid getting the server stuck because of high "-j" value

Thanks you all for the valuable answers!

cheers,

Gianfranco