All of lore.kernel.org
 help / color / mirror / Atom feed
* feature request: avoid getting the server stuck because of high "-j" value
       [not found] <1280838053.2327487.1501829336917.ref@mail.yahoo.com>
@ 2017-08-04  6:48 ` Gianfranco Costamagna
  2017-08-04 10:58   ` [feature request] " Gianfranco Costamagna
  0 siblings, 1 reply; 6+ messages in thread
From: Gianfranco Costamagna @ 2017-08-04  6:48 UTC (permalink / raw)
  To: yocto

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [feature request] avoid getting the server stuck because of high "-j" value
  2017-08-04  6:48 ` feature request: avoid getting the server stuck because of high "-j" value Gianfranco Costamagna
@ 2017-08-04 10:58   ` Gianfranco Costamagna
  2017-08-04 11:54     ` Alexander Kanavin
  2017-08-04 12:00     ` Burton, Ross
  0 siblings, 2 replies; 6+ messages in thread
From: Gianfranco Costamagna @ 2017-08-04 10:58 UTC (permalink / raw)
  To: yocto

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [feature request] avoid getting the server stuck because of high "-j" value
  2017-08-04 10:58   ` [feature request] " Gianfranco Costamagna
@ 2017-08-04 11:54     ` Alexander Kanavin
  2017-08-04 12:00     ` Burton, Ross
  1 sibling, 0 replies; 6+ messages in thread
From: Alexander Kanavin @ 2017-08-04 11:54 UTC (permalink / raw)
  To: Gianfranco Costamagna, yocto

On 08/04/2017 01:58 PM, Gianfranco Costamagna wrote:

> 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).

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [feature request] avoid getting the server stuck because of high "-j" value
  2017-08-04 10:58   ` [feature request] " Gianfranco Costamagna
  2017-08-04 11:54     ` Alexander Kanavin
@ 2017-08-04 12:00     ` Burton, Ross
  2017-08-04 12:01       ` Burton, Ross
  1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2017-08-04 12:00 UTC (permalink / raw)
  To: Gianfranco Costamagna; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1568 bytes --]

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

On 4 August 2017 at 11:58, Gianfranco Costamagna <
costamagnagianfranco@yahoo.it> wrote:

> 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
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 2246 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [feature request] avoid getting the server stuck because of high "-j" value
  2017-08-04 12:00     ` Burton, Ross
@ 2017-08-04 12:01       ` Burton, Ross
  2017-08-24 10:14         ` Gianfranco Costamagna
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2017-08-04 12:01 UTC (permalink / raw)
  To: Gianfranco Costamagna; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1941 bytes --]

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

On 4 August 2017 at 13:00, Burton, Ross <ross.burton@intel.com> wrote:

> 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
>
> On 4 August 2017 at 11:58, Gianfranco Costamagna <
> costamagnagianfranco@yahoo.it> wrote:
>
>> 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
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3042 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [feature request] avoid getting the server stuck because of high "-j" value
  2017-08-04 12:01       ` Burton, Ross
@ 2017-08-24 10:14         ` Gianfranco Costamagna
  0 siblings, 0 replies; 6+ messages in thread
From: Gianfranco Costamagna @ 2017-08-24 10:14 UTC (permalink / raw)
  To: yocto

Thanks you all for the valuable answers!

cheers,

Gianfranco


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-24 10:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1280838053.2327487.1501829336917.ref@mail.yahoo.com>
2017-08-04  6:48 ` feature request: avoid getting the server stuck because of high "-j" value Gianfranco Costamagna
2017-08-04 10:58   ` [feature request] " Gianfranco Costamagna
2017-08-04 11:54     ` Alexander Kanavin
2017-08-04 12:00     ` Burton, Ross
2017-08-04 12:01       ` Burton, Ross
2017-08-24 10:14         ` Gianfranco Costamagna

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.