Does C2D support Hyperthreading?

Our "pub" where you can post about things completely Off Topic or about non-silent PC issues.

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Post Reply
Tzupy
*Lifetime Patron*
Posts: 1561
Joined: Wed Jan 12, 2005 10:47 am
Location: Bucharest, Romania

Does C2D support Hyperthreading?

Post by Tzupy » Wed Aug 08, 2007 8:48 am

I know the official answer is NO. But something strange happened, that makes me wonder:
I am in the process of adding multithreading support to the software I am in charge of, using OpenMP and running on dual-core E6600.
Since the software may end up running on dual-processor quad-core machines, I wanted to see the performance drop when using upto 8 threads on my dual-core machine.
To my surprise, going from 2 to 4 threads resulted in a performance increase of 20-25%. With 8 threads, as expected, small performance decrease (over 4 threads).
I currently can't explain why 4 threads run a bit faster than 2 on a dual-core processor, that is not supposed to support HT. I didn't do anything to enable HT myself.

borc
Posts: 20
Joined: Wed Dec 06, 2006 10:59 pm
Location: Tampere, Finland

Post by borc » Wed Aug 08, 2007 9:25 am

I've seen this kind of behaviour when I'm compiling stuff. Compiling seems to happen faster if you use two threads per cpu (core).

Beyonder
Posts: 757
Joined: Wed Sep 11, 2002 11:56 pm
Location: EARTH.

Re: Does C2D support Hyperthreading?

Post by Beyonder » Sat Aug 11, 2007 4:49 pm

Tzupy wrote:I know the official answer is NO. But something strange happened, that makes me wonder:
I am in the process of adding multithreading support to the software I am in charge of, using OpenMP and running on dual-core E6600.
Since the software may end up running on dual-processor quad-core machines, I wanted to see the performance drop when using upto 8 threads on my dual-core machine.
To my surprise, going from 2 to 4 threads resulted in a performance increase of 20-25%. With 8 threads, as expected, small performance decrease (over 4 threads).
I currently can't explain why 4 threads run a bit faster than 2 on a dual-core processor, that is not supposed to support HT. I didn't do anything to enable HT myself.
I don't know much about OpenMP; when you say you went from 2 to 4 threads, are these threadpool threads, worker threads, threads your application spawns itself, etc.?

C2D is not hyperthreaded. If it was, task manager would show four CPUs.

aaa
Posts: 167
Joined: Tue Jul 11, 2006 7:23 pm

Post by aaa » Sun Aug 12, 2007 7:26 am

If the threads do disk IO or wait for anything then that would be the reason. One thread 'wait's awhile, leaving a big slice of unused processor time. If you have two per cpu, the empty slice gets taken by the second thread.

cloneman
Posts: 448
Joined: Sat May 21, 2005 9:48 am

Post by cloneman » Mon Aug 13, 2007 10:42 am

or have your considered the possibility that windows stupidly put both threads on the same core when you had 2?

Post Reply