All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Richard Purdie <rpurdie@linux.intel.com>
Cc: poky@pokylinux.org
Subject: Re: distcc/ccache?
Date: Wed, 08 Dec 2010 09:39:26 -0800	[thread overview]
Message-ID: <4CFFC2CE.4090809@linux.intel.com> (raw)
In-Reply-To: <1291806770.1554.304.camel@rex>

On 12/08/2010 03:12 AM, Richard Purdie wrote:
> On Wed, 2010-12-08 at 01:51 -0500, Jon Masters wrote:
>> Anyone happen to know if poky plays nicely with distcc?
>
> I think most success has been with icecc in the past and there is a
> icecc class which has code to enable that. It turns out that compiling
> isn't the main bottleneck in builds though and icecc isn't something we
> test in Poky at this time, we just provide the same class OE has which
> may or may not work.

While not distributed compiling related, the following might add some 
perspective as to what to expect with more compile nodes.

I tried a poky-image-sdk (qemux86_64) build on a 4 socket Westmere 
machine (40 physical cores total, 80 hardware threads). I set my 
local.conf to:

BB_NUMBER_THREADS = "160"
PARALLEL_MAKE = "-j 160"

After a warm-up build (get everything downloaded) I cleaned tmp and 
sstate-cache and did another build. This one build took 118 minutes to 
complete.

$ time bitbake poky-image-sdk

<time passes & bitbake spews messages like g++ and a buggy stl program>

NOTE: Tasks Summary: Attempted 5619 tasks of which 300 didn't need to be 
rerun and 0 failed.

real    117m56.025s
user    961m28.822s
sys     464m27.318s


I checked the CPU load periodically, often finding it under 10%. While 
not a scientific test, what this tells me is that the build is 
relatively serialized and/or much of the process is blocked on I/O. It 
also suggests that a really big machine isn't all that helpful in 
speeding up builds (although 117m is nothing to be ashamed of!).

One could likely run four parallel builds on this system and have them 
complete in about the same amount of time. I ran 4 copies of the above 
load (even leaving the parallelism settings at 160). All 4 builds 
completed in between 186 and 192 minutes. The system load average about 
120 (just eyeballing it), with peaks as high as 700. All four builds 
used the same disk, suggesting build dependencies leading to build 
serialization is the primary bottleneck. So while you definitely want a 
good number of CPUs to build, that number tapers off rapidly. Somewhere 
around 10 I'd guess (for single builds). I'd have to run a number of 
more tests to be sure.

Anyway, hopefully that adds a datapoint of some use.

-- 
Darren Hart
Yocto Linux Kernel


      parent reply	other threads:[~2010-12-08 17:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08  6:51 distcc/ccache? Jon Masters
2010-12-08 11:12 ` distcc/ccache? Richard Purdie
2010-12-08 13:42   ` distcc/ccache? Tom Rini
2010-12-08 15:21   ` distcc/ccache? Jon Masters
2010-12-08 15:53     ` distcc/ccache? Koen Kooi
2010-12-08 17:39   ` 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=4CFFC2CE.4090809@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=poky@pokylinux.org \
    --cc=rpurdie@linux.intel.com \
    /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.