inktri
February 20th, 2009, 03:50 AM
I've got an i7 with hyperthreading.
Why does Runtime.getRuntime().availableProcessors() return 1 under Ubuntu, but the correct number 8 under Windows?
In addition when I try to run some multi threaded code like matrix multiplication under Ubuntu, the calculation gets slower as more threads are added (1 thread is fastest). Strangely the linux System monitor is indicating that the correct number of processors are under load (eg. if i've got 4 threads, 4 cores are at 100%), but yea it still runs slower.
Under Windows with the same code, I'm getting the proper speed up as more threads are added (8 threads is about ~6 times faster than 1 thread).
http://forums.sun.com/thread.jspa?threadID=5367895&tstart=0
Is there some setting under Linux or Eclipse I'm missing?
Thanks
Why does Runtime.getRuntime().availableProcessors() return 1 under Ubuntu, but the correct number 8 under Windows?
In addition when I try to run some multi threaded code like matrix multiplication under Ubuntu, the calculation gets slower as more threads are added (1 thread is fastest). Strangely the linux System monitor is indicating that the correct number of processors are under load (eg. if i've got 4 threads, 4 cores are at 100%), but yea it still runs slower.
Under Windows with the same code, I'm getting the proper speed up as more threads are added (8 threads is about ~6 times faster than 1 thread).
http://forums.sun.com/thread.jspa?threadID=5367895&tstart=0
Is there some setting under Linux or Eclipse I'm missing?
Thanks