[GHC] #3989: Parallel GC with more -N than physical processors
gives dramatic slowdown (75 times)
GHC
cvs-ghc at haskell.org
Wed Apr 14 05:27:55 EDT 2010
#3989: Parallel GC with more -N than physical processors gives dramatic slowdown
(75 times)
---------------------------------+------------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Component: Runtime System
Version: 6.12.1 | Keywords:
Os: Windows | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Running hlint 1.6.21 (http://hackage.haskell.org/package/hlint) with GHC
6.12.1 on a Windows laptop with two cores, I get:
{{{
timer hlint src +RTS -N1 -qg = 1.344 seconds
timer hlint src +RTS -N2 -qg = 1.000 seconds
timer hlint src +RTS -N3 -qg = 0.984 seconds
timer hlint src +RTS -N4 -qg = 1.016 seconds
timer hlint src +RTS -N1 = 1.344 seconds
timer hlint src +RTS -N2 = 0.969 seconds
timer hlint src +RTS -N3 = 76.563 seconds
}}}
At -N1, -qg has no effect (as expected)
At -N2, -qg has a small positive effect (I repeated the benchmarks many
times, so the effect is there)
At -N3, -qg is essential or it takes forever
The result seems to be that if you overschedule your garbage collector it
goes totally crazy. People often use -N with a higher number than their
processors, since it nicely allows IO and computation to be interleaved.
GC should probably drop that -N down if it gets lots of contention.
This is a performance regression from GHC 6.10.4, where HLint worked fine
with +RTS -N3. I only caught this regression as my test suite started to
take forever to run.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3989>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list