Ticket #5367 (closed bug: wontfix)
Program in (-N1) runs 10 times slower than it with two threads (-N2)
| Reported by: | wuxb | Owned by: | simonmar |
|---|---|---|---|
| Priority: | high | Milestone: | 7.4.1 |
| Component: | Runtime System | Version: | 7.0.4 |
| Keywords: | thread ffi | Cc: | |
| Operating System: | Linux | Architecture: | x86_64 (amd64) |
| Type of failure: | Runtime performance bug | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

