mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jesper Juhl" <jesper.juhl@gmail.com>
To: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Cc: "Sam Ravnborg" <sam@ravnborg.org>,
	"Andrew Morton" <akpm@osdl.org>,
	"Jesper Juhl" <jesper.juhl@gmail.com>
Subject: Re: make -j with j <= 4 seems to only load a single CPU core
Date: Tue, 21 Feb 2006 22:10:46 +0100	[thread overview]
Message-ID: <9a8748490602211310j344db10evd685149a3c60b1e7@mail.gmail.com> (raw)
In-Reply-To: <9a8748490602211302j61c0088fp8b555860e928028e@mail.gmail.com>

On 2/21/06, Jesper Juhl <jesper.juhl@gmail.com> wrote:
> This is quite odd and I've no idea where to start looking for the
> cause, but let me describe what I'm seeing and maybe someone can point
> me in the right direction.
>
> I'm running SMP 2.6.x kernels on a Athlon 64 X2 4400+
>

I should probably mention that the kernel I'm currently running and
observing this behaviour with is 2.6.16-rc4-mm1.

> When I build new kernels I use 'make -j' to get both CPU cores busy
> and minimize build time.
>
> I've observed that when I use 'make -j 2', 'make -j 3' or 'make -j 4'
> only ~half of my CPU resources get used during the build and when I
> look at the output it looks exactely like output from plain 'make' for
> something like 95% of the  build - that is, files get build
> sequentially, not in parallel.
> However, if I run 'make -j 5' or higher, then both cores get lots of
> work to do and utilization of both cores stay close to 100% for almost
> the entire build, and the output during the build shows lots of files
> from different directories intermixed, so it's clearly building stuf
> in parallel.
>
> I find this quite strange since anything from 'make -j 2' and up
> should be able to keep both cores resonably busy, but there seems to
> be a huge difference between j <= 4 and j > 4.
>
> Another datapoint: This is most pronounced when I am also running the
> make process nice'd. Which I usually do in order to be able to use the
> machine for other tasks while the build is in progress.
> If I don't run the build nice'd then it starts to be resonably
> parallel at j >= 3, but still doesn't *really* load both cores before
> j >= 5.
>
>
> Just to be completely clear - a few examples:
>
> This is what I usually run to load both cores well :
>
> nice make -j 5 2>&1 | tee build.log
>
> this however gives me a more or less serial build with only half the
> system resources used :
>
> nice make -j 4 2>&1 | tee build.log
>
> Without nice this loads the box somewhat OK (but not completely):
>
> make -j 3 2>&1 | tee build.log
>
> and this pretty much gives me a serial build:
>
> make -j 2 2>&1 | tee build.log
>
>
> Any good explanations for this behaviour ?
>
>

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  reply	other threads:[~2006-02-21 21:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21 21:02 Jesper Juhl
2006-02-21 21:10 ` Jesper Juhl [this message]
2006-02-21 21:42   ` Paul Fulghum
2006-02-21 21:47     ` Paul Fulghum
2006-02-21 21:51     ` Jesper Juhl
2006-02-21 21:54       ` linux-os (Dick Johnson)
2006-02-21 21:59         ` Jesper Juhl
2006-02-21 22:02     ` Jesper Juhl
2006-02-21 22:15   ` Sam Ravnborg
2006-02-21 22:18     ` Jesper Juhl
2006-02-23 19:44 ` Jan Engelhardt

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=9a8748490602211310j344db10evd685149a3c60b1e7@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®