[Haskell-cafe] Re: Scarry parallel garbage collection behavior (6.12.1, Mac OSX)

Simon Marlow marlowsd at gmail.com
Mon Feb 22 09:10:55 EST 2010

On 19/02/2010 21:26, Pavel Perikov wrote:

> This is a long post, sorry. The bottom line: specifying +RTS -Nn where n>  number of cores slows the program  compiled with 6.12.1 by orders of magnitude under Mac OSX. Turning off parallel garbage collections with -qg
> resolves the problem. Independent verification is appreciated.

The parallel GC currently requires all cores to synchronise, so if 
you're trying to use more cores than you actually have, you can expect 
the cost of that synchronisation to be high.  Having said that, the cost 
is higher than we would like mainly due to the use of spinlocks for 
synchronisation - spinlocks turned out to be the fastest way to 
synchronise when all the threads are running, but are quite bad when 
some threads have been descheduled (as would be the case if you are 
using more threads than you have cores).  So in 6.12.2 there will be 
some changes that reduce the overhead quite significantly, see





More information about the Haskell-Cafe mailing list