From: Darren Hart <dvhart@linux.intel.com>
To: Chris Larson <clarson@kergoth.com>
Cc: gmane@reliableembeddedsystems.com, poky@pokylinux.org
Subject: Re: build performance: bb-matrix on 4-core (BB_NUMBER_THREADS and PARALLEL_MAKE optimization)
Date: Sun, 10 Jul 2011 00:13:56 -0700 [thread overview]
Message-ID: <4E195134.2060601@linux.intel.com> (raw)
In-Reply-To: <CABcZANkBJzCk+ceCYyyx79zqsA87t7E5K=GAERj0Zjaugxi2_A@mail.gmail.com>
On 07/09/2011 02:16 PM, Chris Larson wrote:
> On Sat, Jul 9, 2011 at 1:36 AM, Darren Hart <dvhart@linux.intel.com> wrote:
>> On 07/08/2011 01:44 PM, Robert Berger wrote:
>>> Darren/Richard,
>>>
>>> Maybe we could instead of hacking hard coded default values (or nothing)
>>> into the config file default to something like this:
>>>
>>> somehow get the number of CPUs:
>>>
>>> CPUS=$(grep ^processor /proc/cpuinfo | wc -l)
>>> echo CPUS=${CPUS}
>>>
>>> or
>>>
>>> CPUS=`getconf _NPROCESSORS_ONLN`
>>> echo CPUS_UBUNTU=${CPUS_UBUNTU}
>>>
>>> (don't know if the second one will also work with other distros than Ubuntu)
>>>
>>> Do some calculation which magic number for BB_NUMBER_THREADS and
>>> PARALLEL_MAKE to use:
>>>
>>> e.g. what was suggested: BB=2*NR_CORES PM=1.5*NR_CORES
>>
>> My concern with this is that on larger machines I'm seeing very
>> different optimal multipliers. On my 12 core with a RAID 0 build array,
>> the ideal setting seems to be BB=12 PM=12.
>>
>> Until we can better characterize the ideal settings, I think we are
>> better off documenting what works for specific systems. Now perhaps we
>> need to do something that caps the number, but that is sure to be wrong
>> in short order as well.
>>
>> As your signature suggests, the solution to this isn't likely to be
>> simple ;-)
>
> This may be rather specific to my personal setup, but I use
> https://gist.github.com/776390 -- you'll note that you can adjust the
> scaling factors via variables.
Something like this would probably be a good improvement - but it will
need some sort of step function (of cpu count) for the multipliers. I'm
concerned this step function will be tedious to maintain. I suspect the
ideal number is also dependent on on build path storage (spinning disk,
RAID, SSD, tmpfs, etc.), faster storage can likely benefit from higher
thread counts, whereas slower storage just gets more and more bogged
down under higher thread counts. I'll have some numbers from the 12 core
on Tuesday if I'm extrapolating accurately.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
prev parent reply other threads:[~2011-07-10 7:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-06 18:16 build performance: bb-matrix on 4-core (BB_NUMBER_THREADS and PARALLEL_MAKE optimization) Darren Hart
2011-07-07 10:39 ` Richard Purdie
2011-07-07 18:12 ` Darren Hart
2011-07-08 20:44 ` Robert Berger
2011-07-09 8:36 ` Darren Hart
2011-07-09 21:16 ` Chris Larson
2011-07-10 7:13 ` Darren Hart [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E195134.2060601@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=clarson@kergoth.com \
--cc=gmane@reliableembeddedsystems.com \
--cc=poky@pokylinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.