[Haskell-cafe] Re: GHC's parallel garbage collector -- what am I
marlowsd at gmail.com
Wed Mar 3 08:44:52 EST 2010
On 01/03/2010 21:20, Michael Lesniak wrote:
> Hello Bryan,
>> The parallel GC currently doesn't behave well with concurrent programs that
>> uses multiple capabilities (aka OS threads), and the behaviour you see is
>> the known symptom of this.. I believe that Simon Marlow has some fixes in
>> hand that may go into 6.12.2.
It's more correct to say the parallel GC has difficulty when one of its
threads is descheduled by the OS, because the other threads just spin
waiting for it. Presumably some kernels are more susceptible than
others due to differences in scheduling policy, I know they've been
fiddling around with this a lot in Linux recently.
You typically don't see a problem when there are spare cores, the
slowdown manifests when you are trying to use all the cores in your
machine, so it affects people on dual-cores quite a lot. This probably
explains why I've not been particularly affected by this myself, since I
do most of my benchmarking on an 8-core box.
The fix that will be in 6.12.2 is to insert some yields, so that threads
will yield rather than spinning indefinitely, and this seems to help a lot.
More information about the Haskell-Cafe