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

Pavel Perikov perikov at gmail.com
Mon Feb 22 15:23:24 EST 2010


Thanks, Simon.

I know I should try to find the existing ticket before posting :)

P.

On 22.02.2010, at 17:10, Simon Marlow wrote:

> 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
> 
> http://hackage.haskell.org/trac/ghc/ticket/3758
> 
> and
> 
> http://ghcmutterings.wordpress.com/2010/01/25/yielding-more-improvements-in-parallel-performance/
> 
> Cheers,
> 	Simon



More information about the Haskell-Cafe mailing list