[Haskell-cafe] Strange parallel behaviour with Ubuntu Karmic / GHC 6.10.4

Michael Lesniak michael.lesniak at gmail.com
Fri Nov 13 09:30:14 EST 2009


I'm currently developing some applications with explicit threading
using forkIO and have strange behaviour on my freshly installed Ubuntu
Karmic 9.10 (Kernel 2.6.31-14 SMP).

Machine A: Quadcore, Ubuntu 9.04, Kernel  2.6.28-13 SMP
Machine B: AMD Opteron 875, 8 cores,  2.6.18-164 SMP- (some redhat)
Machine C: Dual-Core, Ubuntu 9.10, Kernel 2.6.31-14 SMP
Compiler on all machines: ghc 6.10.4 (downloaded from GHCs official website)

Program, Compilation, Execution
A simple taskqueue with independent tasks and explicit parallelization
(hence should deliver more or less perfect speedup).
For one core wall-times around 16 are ok, for 2 a bit more than 8 seconds.

Since I used the same sources and Makefiles on all machines all files
were compiled with -threaded and started with +RTS -N2 -RTS.

Machine A: Ok (meaning works and delivers the expected speedup)
Machine B: Ok
Machine C: Not ok (with -N2 wall times around 14-15 seconds)

Looking at the core usage, for example with htop, I see that the
second core is not really used on C. Executing OpenMP programs shows
the expected speedup and usage of both cores, hence I do not think its
a kind of general linux configuration problem.

So, after all the testing I think its either the Linux Kernel or some
other component of Ubuntu 9.10. But: Ubuntu is often used and I did
not found any information regarding this problem. The simple solution
of installing the old version of Ubuntu would probably help but should
not be the way to go, should it?

I'd be glad for any hints or comments,

Dipl.-Inf. Michael C. Lesniak
University of Kassel
Programming Languages / Methodologies Research Group
Department of Computer Science and Electrical Engineering

Wilhelmshöher Allee 73
34121 Kassel

Phone: +49-(0)561-804-6269

More information about the Haskell-Cafe mailing list