Tom's Guide Forums
  Tom's Guide Forums » Overclocking » CPUs » How Hyperthreading works
 

Add a reply



 Word :   Username :  
 
Bottom
Author
 Thread : How Hyperthreading works
 
More Information

Hi All,

Need to clarify a Hyperthreading question here:
If I have a P4 w/ Hyperthreading, does Hyperthreading only apply to 1 process or can it apply to multiple processes?

Does 1 multi-threaded process only use Hyperthreading?
Or can 2 individual processes gain with Hyperthreading? Say 1 intensive process uses the CPU most, can the 2nd process (Firefox or something) use the CPU at the same time?

It was my understanding that it effectively looked like a 2-CPU system, but multiple processes could use the CPU at the same time, given that the Hyperthreading conditions were met.

I've seen articles both ways, so if you can find something that's on a reputable site, I'd ask you to link it.

Thanks!

Related Pr oduct
Register or log in to remove.

More Information

I found this on Tom's Hardware, but I need to determine if its absolutely correct:

"That includes high-scale transaction-oriented computing, financial, engineering and scientific digital media, gaming, and special effects applications, or in short, any application that runs the CPU at full throttle with more than one thread."
http://www.tomshardware.com/2002/1 [...] plication/

I mean, that obviously would help the application, but what about other background processes? Would Hyperthreading be able to give tasks to the unused CPU resources while running an intensive app?

More Information

go pm mike he knows the most about procs on these forumz

More Information

If you care to have a peek:


http://arstechnica.com/articles/pa [...] eading.ars


Cheers!

More Information

Quote :

If you care to have a peek:


http://arstechnica.com/articles/pa [...] eading.ars


Cheers!

thats good too

More Information

Quote :

If you care to have a peek:
http://arstechnica.com/articles/pa [...] eading.ars
Cheers!


First off, thanks a ton for the link!

Now... This would suggest that multiple processes can use Hyperthreading, just not to its fullest extent.
"Intel's next major IA-32 processor release, codenamed Prescott, will include a feature called simultaneous multithreading (SMT), also known as hyper-threading."

"SMT, in a nutshell, allows the CPU to do what most users think it's doing anyway: run more than one program at the same time. "

"As with SMP, this will ultimately depend on the applications themselves, since multithreaded apps will benefit more from hyper-threading than single-threaded ones. Of course, unlike with SMP there will be an added twist in that real-world performance won't just depend on the applications but on the specific mix of applications being used."

Hyperthreading can run multiple threads at once and this article seemed to suggest that since the CPU itself does not know or care where these threads came from (whether or not the same process spawned them), running multiple processes is possible.

Does that sound right?
Thanks again!

More Information

No part of the hardware says it can't be executing threads simultaneously from unrelated processes. It's up to the OS scheduler, which also likely wouldn't impose such a restriction.

More Information

Quote :

"Intel's next major IA-32 processor release, codenamed Prescott, will include a feature called simultaneous multithreading (SMT), also known as hyper-threading."

"SMT, in a nutshell, allows the CPU to do what most users think it's doing anyway: run more than one program at the same time. "

"As with SMP, this will ultimately depend on the applications themselves, since multithreaded apps will benefit more from hyper-threading than single-threaded ones. Of course, unlike with SMP there will be an added twist in that real-world performance won't just depend on the applications but on the specific mix of applications being used."

Hyperthreading can run multiple threads at once and this article seemed to suggest that since the CPU itself does not know or care where these threads came from (whether or not the same process spawned them), running multiple processes is possible.

Does that sound right?



Some corrections to the (2002) article (and mind this: the author is a very respected computer engineer... but, everybody makes mistakes, now & then.):

1. Intel IA-32 stands for Intel Architecture 32-bits; however, none of Intel processors - apart Itanium - use IA-32. From the first P4 and up until now, only "NetBurst" x86 architecture was used by Intel, until Dempsey/Conroe/Merom are released (IA-32 is a sub-set of IA-64 or EPIC, which was implemented to allow Itanium to run 32-bit applications but was recently abandoned.);

2. "As with SMP, this will ultimately depend on the applications themselves, (...)".

I guess this and psyno's reply do answer your question.
Also, if you've gone through the full article, you must have noticed that "Hypertheading" is a logical, rather than, a physical process (uses the same resources alternately, which makes it hardly SMT...).


Cheers!

More Information

Fanboys...


No, most of the high-end technologies do come from the mainframe space.
Although Intel's "Hyperthreading" is an Intel patent, similar 'virtualization' (better call it logical partitioning) technologies already existed, for instance, in IBM mainframe architectures... a bit like AMD's "HyperTransport", inherited from DEC Alpha's...

More Information

APOLOGY

Quote:
"Intel's next major IA-32 processor release, codenamed Prescott, will include a feature called simultaneous multithreading (SMT), also known as hyper-threading."


http://arstechnica.com/articles/pa [...] eading.ars


«Some corrections to the (2002) article (and mind this: the author is a very respected computer engineer... but, everybody makes mistakes, now & then.):

1. Intel IA-32 stands for Intel Architecture 32-bits; however, none of Intel processors - apart Itanium - use IA-32. From the first P4 and up until now, only "NetBurst" x86 architecture was used by Intel, until Dempsey/Conroe/Merom are released (IA-32 is a sub-set of IA-64 or EPIC, which was implemented to allow Itanium to run 32-bit applications but was recently abandoned.)»

Scratch this.

I must apologize everyone in this thread & the article's author, in particular, for my mistake.

IA-32 (or x86) is the architecture beneath all Intel 32-bit architectures:

ftp://download.intel.com/design/P [...] 896612.pdf

After all, we ALL make mistakes. :oops:


Cheers!

More Information

hi friend,
i just wonder that P4 506 has a indentical architect with the other P4's HTT.So can we activate HTT in P4 506?. because when i use PCMark 2005, it said that my P4 has HTT but it isn't activatied....So anysoftware can do this stuff?...
Thanks

More Information

You must activate HT in the BIOS.


Cheers!

More Information

From what I've seen, HT on a dual core CPU doesn't help much, and in fact hurt performance over just a standard dual core. I'm not sure if this is because of how Intel implemented it or not however.

More Information

Quote :


I mean, that obviously would help the application, but what about other background processes? Would Hyperthreading be able to give tasks to the unused CPU resources while running an intensive app?



that's the ticket

More Information

Quote :

From what I've seen, HT on a dual core CPU doesn't help much, and in fact hurt performance over just a standard dual core. I'm not sure if this is because of how Intel implemented it or not however.




True, HT often hampers performance, even in dual-core processors, mostly because most software is (not yet) multithreading compiled. Also note that, even physical dual-cores do suffer from this software issues; that's why, more often than not, single cores w/identical frequency outperform dual-cores, in non-threaded applications.
Moreover, due to its logical partitioning nature, "Hyperthreading" is an alternating process, where threads share the available common physical execution units, increasing latency.

Cheers!

More Information

I find that HT does actually help overall. The issue at hand is benchmarking, but in truth, what application can you use to apply HT to?
HT is NOT dual-core or dual processor. It utilizes 'unused' areas in the processor to execute other commands on different threads.

I agree w/ joset, most software does not take advantage of multi-logical processors.

But after enabling HT, here are my observations:
1) The system is more responsive when doing CPU intensive applications (single threaded) - I find that this is because the unused parts of the CPU are being used now. The application suffers minimally in execution time, given that you don't do any other CPU intensive stuff.
2) Its faster when you're running 2 CPU intensive apps. One app might be slower than if it were done w/o HT enabled, but there is a net time gain overall. I've tested this.
3) HT gives the performance gain when 2 threads or processes do not depend on each other for data. If one thread is waiting for the other for processing data, its going to be slow. But if the threads don't need anything from each other, its just contention for CPU areas - but this isn't altogether bad, since 100% of the CPU is being used. Contention means that two threads are waiting for 1 area of the CPU, but once the 1st thread is done, the 2nd thread goes through, while the 1st thread uses other parts of the CPU. So overall its better, as long as the app is intensive enough to let the gains overcome the HT overhead. If I run 2 instances of an identical app, I see a significant performance increase - almost 20% time saved. I've reproduced that whenever I turn HT on.

So IMO, HT gains/losses depends on 1) the application you are running, 2) the other applications that are running, 3) how intensive the app is for the CPU, and 4) how accurately you are able to test it (and retest it).

More Information

Quote :

HT is NOT dual-core or dual processor. It utilizes 'unused' areas in the processor to execute other commands on different threads.


But after enabling HT, here are my observations:
1) The system is more responsive when doing CPU intensive applications (single threaded) - I find that this is because the unused parts of the CPU are being used now. The application suffers minimally in execution time, given that you don't do any other CPU intensive stuff.



Technically, HyperThreading is not really a SMT process (Simultaneous Multi-Threading), since it's not... well, simultaneous; it's alternate. The issue common to [all] SMT is that both OS & the CPU's back-end units, must "search" for instruction extraction (from threads) to execute in "parallel".
For one, there are always processes running in the background which keep the CPU busy; however, 'running' & 'executing', are different matters. Unless for multi-threaded compiled applications, HyperThreading is fine for "simultaneous multi-tasking" (again, that's also why a single core, at the same frequency, beats a dual-core in single-threaded apps.).

In real-world usage, however, there are a lot of other factors to take into account which makes my "technical" argument purely theoretical.


Cheers!

More Information

Quote :

Technically, HyperThreading is not really a SMT process (Simultaneous Multi-Threading), since it's not... well, simultaneous; it's alternate. The issue common to [all] SMT is that both OS & the CPU's back-end units, must "search" for instruction extraction (from threads) to execute in "parallel".



Er, actually this is incorrect, on two accounts.

First, Intel's HTT actually is SMT and not alternating. Google Intel's site for HTT/SMT papers...

Second, the OS actually knows nothing about SMT and does nothing special to help it along. It definitely doesn't try to schedule threads based on their instructions to take advantage of the hardware. I'm not sure I would say that the hardware searches for the parallelism either... it's just kind of there.

More Information