Building speed on multi-cpu systems

Andriy Rysin arysin at gmail.com
Sun Feb 22 03:23:59 GMT 2009


2009/2/21 Michael Pyne <mpyne at purinchu.net>

> On Saturday 21 February 2009, Alex Merry wrote:
> > On Sunday 22 February 2009 00:18:22 Andriy Rysin wrote:
> > > I have a 2-core cpu so I was trying to improve KDE compile speed and
> the
> > > quickest solution I could come up with to put "-j 4" in the makeobj
> > > script in the make command call (build speed was up ~30% and I in a
> > > monitor I can see all cores are fully busy now). Though this solution
> > > feels a bit hackish so I was wandering if there's a better/standard way
> > > to do that? If makeobj is the right place may be we could make it more
> > > generic so it tries to detect number of cores automagically (at least
> for
> > > some most popular platforms)?
> >
> > Well, you could just pass -j4 to makeobj, which will pass it on to make.
> > The best place to put that depends on what you use to build kde. If you
> > use the bash scripts on techbase, then you can just edit the cmakekde
> > function, which uses -j2 by default.
> >
> > Alex
>
>
> Mind you probably the best option is -j 3 for a dual-core system (number of
> CPUs + 1). The one extra process is going to be the one doing I/O, the
> others will either be doing work on a CPU core or stuck waiting for I/O, so
> CPUs + 2 doesn't really help much.
>
That's what I used first but somehow when I first tried -j 3 some time ago I
saw some relatively big dents in my 100% cpu load graph. Interestingly I
retried it today and dents are much smaller, so I might stick to -j 3 as a
theoretically better number :)

Thanks,
Andriy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090221/ade16bbf/attachment.htm>


More information about the kde-core-devel mailing list