[OE-core] for a quad-core machine, shouldn't parallelism be set to 8?

Bjørn Forsman bjorn.forsman at gmail.com
Wed Jan 9 18:42:02 UTC 2013


On 9 January 2013 13:55, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>
>   just noticed this in local.conf.sample:
>
> # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
> # be appropriate for example.
>
>   i thought the general rule was that parallelism should be *twice*
> the number of cores.  that's certainly what's suggested in the yocto
> QS guide:

Some time ago I wrote a script to build the linux kernel 3 times at
each -jN level from 1 to 50. Then I averaged the build time on each
-jN level. I got the fastest build with -jNCPUS. Going above NCPUS
just added overhead, although very little. The overhead seemed to
build up quite linearly from above -jNCPUS. Because the overhead is so
little, having -jNCPUS*2 may not be noticeably slower than -jNCPUS.

I ran the same benchmark another machine and it showed the same trend
curve. Note that NCPUS must include the hyperthread cores.

Best regards,
Bjørn Forsman




More information about the Openembedded-core mailing list