Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Oct 1996 09:23:05 +0800
From:      Peter Wemm <peter@spinner.DIALix.COM>
To:        "Jonathan M. Bresler" <jmb@freefall.freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: make -j# 
Message-ID:  <199610140123.JAA03430@spinner.DIALix.COM>
In-Reply-To: Your message of "Sun, 13 Oct 1996 17:46:37 MST." <199610140046.RAA14663@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
"Jonathan M. Bresler" wrote:
> Peter Wemm wrote:
> > 
> > I find that using -pipe is a better overall option for a single-cpu compile
[..]
> > However, on the smp kernel it -j# certainly is nice! :-)
> 
> Peter,
> 	how much faster is make work on an smp box than on the 
> 	same box running only one processor?   how much of a boost
> 	are we getting at this point?
> 
> 	if i had a multiprocessor box, i would know without asking ;(
> jmb

I knew I'd be getting questions like this if I mentioned smp.. :-)

The machine I have here is somewhat crippled.  It's a old neptune pciset 
based board which has the interesting requirement that if you turn on 
writeback on the cpu cache, it apparently needs to be turned off on the L2 
cache or you get nasty coherency problems (which I certainly saw with L2 
writeback enabled, certain "locked" bus-cycles were getting lost, not good 
when it's holding the kernel mutex updates).  As well, it's certainly not 
known to be a particularly fast motherboard anyway.  I suspect having both 
cpu's hammering the busses is one of the main causes of the slowdown.

Within the kernel, we also have the additional problem that the process 
selection does not count for the benefit of the local cpu cache, and it 
seems more often than not that with multiple processes running, they 
bounce backwards and forwards between the cpus, thrashing the L1 cache 
each time.  As a result, with a single "make" thread with SMP active on 
this slow box, there's an overall slowdown (about 80% normal speed from 
memory, I've not tested the relative speeds for a while).  However, 
running 'make -j4' on this dual processor machine runs at about 1.8 to 1.9 
times faster than the single threaded make, which puts it at about 1.5 
times normal speed.

Remember, this is work-in-progress stuff and we've not put a lot of effort 
into performance yet..  Most of the work has going into the basic "getting 
it working" stuff.

Cheers,
-Peter





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