No "last core parallel slowdown" on OS X

Simon Marlow marlowsd at gmail.com
Mon Apr 20 10:01:34 EDT 2009


Manuel M T Chakravarty wrote:
> Dave Bayer:
>> In that paper, they routinely benchmark N-1 cores on an N core Linux 
>> box, because of a noticeable falloff using the last core, which can do 
>> more harm than good. I had confirmed this on my four core Linux box, 
>> but was puzzled that my two core MacBook showed no such falloff. Hey, 
>> two cores isn't representative of many cores, cache issues yada yada, 
>> so I waited.
> [..]
>> Compared to 2 cores, using 3, 4 cores on an equivalent four core box 
>> running OS X gives speedups of
>>
>>     1.45x, 1.9x
> 
> As another data point, in our work on Data Parallel Haskell, we ran 
> benchmarks on an 8-core Xserve (OS X) and an 8-core Sun T2 (Solaris).  
> On both machines, we had no problem using all 8 cores.

I suspect some scheduling weirdness in Linux, at least in the kernel we're 
using here (2.6.25).  Traces appeared to show that one of our threads was 
being descheduled for a few ms, and this can be particularly severe in GHC 
since our stop-the-world GC needs frequent synchronisations.  One advantage 
of moving to processor-independent GCs would be that we could degrade more 
gracefully if the CPUs are contended, or the OS scheduler just decides to 
use a core for something else for a while.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list