[Haskell-cafe] Parallel weirdness [new insights]

Andrew Coppin andrewcoppin at btinternet.com
Sun Apr 20 16:05:28 EDT 2008


Brandon S. Allbery KF8NH wrote:
>
> On Apr 20, 2008, at 15:41 , Andrew Coppin wrote:
>
>> 1. Does running the GC force all threads to stop? I know some GC 
>> designs do this, but I have no idea how the one GHC implements works.
>>
>> 2. Is the GC still single-threaded? (GHC 6.8.2 here.)
>
> Full GC is single-threaded and stops the entire program, yes.  IIRC 
> GHC's runtime tries to do incremental GC to minimize the need for a 
> full GC.

My brain is telling me I've read something somewhere that had in-depth 
information about GHC's GC implementation - but I can't remember where I 
saw it... (Maybe the developer wiki? I'll go look there anyway, they 
might have some interesting goodies.)

Anyway, the sequential version of the program clearly indicates that the 
thing is doing *a lot* of GC. If the GC sometimes stops the entire 
program, that could sure limit parallelism real fast... I suppose the 
only way to know for sure is to turn the heap size up absurdly high so 
that GC is *never* required, and see what that does. FWIW, I do see 
higher CPU usage figures with a larger heap...



More information about the Haskell-Cafe mailing list