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

Ross Burton ross.burton at intel.com
Wed Jan 9 19:35:24 UTC 2013


On Wednesday, 9 January 2013 at 18:42, Bjørn Forsman wrote:
> > # 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.

Of course if you set BB_NUM_THREADS and PARALLEL_MAKE to NCPUS, then you're actually potentially running NCPUS*NCPUS compile threads.  I'm not convinced that NCPUS*2 is useful with that considered.

Ross




More information about the Openembedded-core mailing list