Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Nov 1999 12:16:22 -0700
From:      Warner Losh <imp@village.org>
To:        Ben Rosengart <ben@skunk.org>
Cc:        Assar Westerlund <assar@sics.se>, hackers@FreeBSD.ORG
Subject:   Re: make -jN world; how to determine optimal value of N? 
Message-ID:  <199911121916.MAA18340@harmony.village.org>
In-Reply-To: Your message of "Thu, 11 Nov 1999 18:16:42 EST." <Pine.BSF.4.20.9911111815450.99311-100000@penelope.skunk.org> 
References:  <Pine.BSF.4.20.9911111815450.99311-100000@penelope.skunk.org>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.20.9911111815450.99311-100000@penelope.skunk.org> Ben Rosengart writes:
: On what basis?  I usually use larger values, like 12, on the theory that
: I have more than enough memory, and if there's free CPU, there should
: always be a process available to use it.

People have measured things and found that the knee in the graph goes
up after 4 on UP machines.  This is usually due to increased context
switch times, cache effects and sometimes thrashing of the disk
cache.  At least those are the usual suspects that have been trotted
before the court of inquiry when -j 5 was a little slower than -j 4
and -j 30 was a whole lot slower.

Additional processes aren't free.  There is a cost for each one.  Up
to 4 the cost is less than the return.  After 4 the return is less
than the cost so there is a net loss for each new process.

Put another way, 9 women can't get together and birth a baby in just 1
month....

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199911121916.MAA18340>