#5367: Program in (-N1) runs 10 times slower than it with two threads (-N2)
-------------------------------+--------------------------------------------
Reporter: wuxb | Owner:
Type: bug | Status: new
Priority: normal | Component: Runtime System
Version: 7.0.4 | Keywords: thread ffi
Testcase: | Blockedby:
Os: Linux | Blocking:
Architecture: x86_64 (amd64) | Failure: Runtime performance bug
-------------------------------+--------------------------------------------
Initially I want to do some test on threads, I wrote this program(see
below) to test the performance when two thread operates on same memory
location.
but with (-N2) rts options, it works normally, but with (-N1), the CPU
work load became vary low (30%~40%). it uses much more time to finish.
no -threaded : 3.7s (wall clock time)
-N2 : 4.0s (wall clock time)
-N1 : 20.0s(wall clock time)
(forkIO/FFI/MVar/Ptr are used in this program).
(fedora-15/ghc-7.0.4; windows-64/ghc-7.0.3).
source code & log messages will be in attached files.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5367>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs