Program in (-N1) runs 10 times slower than it with two threads (-N2)
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.
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |