Subject: Re: Strange behavior with build.sh -j 4
To: Julio Merino <jmmv@menta.net>
From: Steven M. Bellovin <smb@research.att.com>
List: current-users
Date: 10/27/2002 13:52:04
In message <20021027194838.087d9555.jmmv@menta.net>, Julio Merino writes:
>Hello
>
>My i386 box is single-processor, but I wanted to try a build.sh with
>-j 4 to see if performance incremented a bit (like I used to do in
>FreeBSD). Everything went ok until a point where everything started
>to go extremely slow.
>
>I checked this with the wmcpuload dock applet, which shows how much
>cpu is used in percentage. When the build reached "that" point (I have
>the log, can check it later), I saw the cpu most of the time at 0%,
>and it was going up for few moments... i.e.., it did 0% -> 30% (a
>second) -> 0%. And 0% delayed around 2 - 3 seconds. (replace 30% with
>any other value, as sometimes reached 100%). Just to say than before
>I noticed this behavior, uptime showed a load average around 10 and
>before that point, around 1 or 2...
>
>So I stopped the build and restarted it without -j 4, and using -u.
>When it reached the same point as before, wmcpuload said always 100%
>cpu load, which I believe. Files are compiled much faster than before.
>Now, it's still compiling, and cpu does not get lower than 90% load...
>
>Anybody knows what's going on?
>

Might it be thrashing on memory?  How much RAM do you have?  Can you 
check what was happening to the swap rate at that point?

		--Steve Bellovin, http://www.research.att.com/~smb (me)
		http://www.wilyhacker.com ("Firewalls" book)