Sign in with
Sign up | Sign in
Your question

Hyperthreading vs SMP What's the difference

Last response: in CPUs
Share
December 3, 2002 8:38:17 AM

I'm trying to understand what HT is all about. As I see it an SMP (Symetric Multiprocessing system) should always be able to beat a HT system because it will have twice as many execution resources available.

All HT is doing is exposing the multiple execution units in the processor to the OS so that it can take on some of the role that is usually handled by the processor.

This seems to me to be VLIW (Very Long Instruction Word) in disguise where the concept is that your compiler is tightly tied to your target platform and handles much of the scheduling of code on execution units rather than have the processor do this at runtime.

I guess it comes down to who you want to do the scheduling, your processor or Windows! Ultimately however the processor will loose the scheduling logic and use the space to provide more execution units or something.
December 3, 2002 9:30:08 AM

HT is all about using the cpu time more efficiently, that means less idling.I think thats it.
SMP, well what I have read, it doesn't do so well in one user apps, it's good on servers under Unix or Linux doing some heavy stuff, like serving other apps or comps.
Windows,and trying to do some heavy work reliably = a sad story.
So far at least. Millions and millions of man-hours have been wasted to deal with WindowsBugs. I wonder what that wasted time would make in dollars, or how many cups of rice.

As what comes to VLIW, it has been tried before but it didn't work out then(not enough iron nor clever compilers).
I wonder what happens with Titanium.
December 3, 2002 3:18:46 PM

You're more or less right. HT is just a cute little trick to help optimize the utilization of a single CPU. It doesn't even begin to compare to just throwing an extra processor at the problem though. (SMP)

It's just another way of tackling the same problem that has plagued software developers for ages. Do you design a smart compiler to order everything well in your code? Do you use a profiler to order your own code so well that it always uses as much as possible of the CPU? Or do you use HT and let the OS and processor try to do it for you ... so long as you write multi-threaded applications and/or run multiple applications simultaniously.

If you write single-threaded apps and only optimize your code or compiler, then the CPU is still slow when it tries to run two programs at once because your code is designed to be run only by itself.

If you use HT, then so long as you're running multiple threads, the processor and OS work out fairly useful (but not always the absolute best) optimizations on their own. But of course you may never get the absolute best possible performance from code tweaking that way, and writing multi-threaded code is a laborous process that also incurs a minor performance pentalty to manage the threads harmoniously and makes code much more bug prone from thread timing problems.

Neither way is a perfect solution. However, Intel would have us believe that HT at least is more effective than using a profiler to optimize your own code. Never mind that programmers who have done so have single-threaded code that runs better without a HT chip than multi-threaded code on a HT chip of the same speed.

So really, the best way to increase performance is still to use SMP. Give more resources for threads to consume and of course the software will be faster. It's costly though. Hence the other methods that are more cost effective.

More importantly, HT (in theory) makes writing multi-threaded code a lot more beneficial for software developers now. So (in theory) most software developers will start writing multi-threaded code, and then we'll live in an Intel-utopia where software always runs about twice as fast on a dualie system than it does on a single-CPU system because all software is multi-threaded. (As opposed to the current dualie-hell where most software is single-threaded and thus by nature can only use the resources of one processor, so these apps run about the same speed on a dualie system as they do on a single-cpu system.)

Once Intel's utopia comes into place, then of course <i>everyone</i> will want a dualie system at the very minimum, and thus Intel makes at least twice as much money per system sold. Heh heh.

So basically HT is Intel's lure to get software engineers to pave the road to Intel's utopia.

<A HREF="http://forumz.tomshardware.com/community/modules.php?na..." target="_new"><font color=red>Join</font color=red> <font color=blue>the</font color=blue> <font color=green>THGC</font color=green> <font color=orange>LAN</font color=orange> <font color=purple>Party</font color=purple>!</A>
Related resources
December 3, 2002 7:00:52 PM

SMP chip can be also SMT.

Intel have never say it be like 2 cpu in 1

This seems to me to be VLIW (Very Long Instruction Word) in disguise where the concept is that your compiler is tightly tied to your target platform and handles much of the scheduling of code on execution units rather than have the processor do this at runtime.

It all the sheduling so cutting 4 stage in a cpu and less transistor



Now what to do??
December 3, 2002 7:18:51 PM

I don't think so. Thread management is largely up to the OS and can't really be handled or predicted at compile. There are optimizations that the compiler can do that'll make the OS's job easier, but it's nowhere near the amount of control over instruction parallelism that VLIW gives the compiler.

"We are Microsoft, resistance is futile." - Bill Gates, 2015.
December 3, 2002 7:23:53 PM

It just bugs me a lot when everywhere you hear, including hardware websites, claims at how HT is like two processors in one. This is utter BS.
All it is, is that it makes much more efficient use of its ressources or makes sure the pipeline is fed whenever some thread has latency.
I really am irritated when the FUD about "two processors in one" is said, especially when as you stated SMP is still more performing!

--
The THGC Photo Album project,<A HREF="http://forumz.tomshardware.com/modules.php?name=Forums&..." target="_new">CLICK HERE!</A>
December 4, 2002 8:46:22 AM

True its all to do with coarse and fine grained parallelism. At present only XP supports HT - fine grained multiprocessing, where NT/2000 support SMP - Coarse grained. What happens when dual P4 systems get built and you put HT processors in them. I'm quite sure a service pack could enable HT support for NT/2000 but then a dual CPU workstation would see 4 processors and workstation is only licensed to run on two processors.

I know all theoretical at present since no dual p4 boards and no HT support in 2000.
December 4, 2002 9:01:32 AM

One of the benefits of HT I hope will be the better development of mutithreaded apps. In the past I owned a Dual PPro 200 system but was frustrasted at the lack of performance wven with apps that were allegedly multithreaded.

I see no problem with HT paving the way to the wider adoption of SMP as a mainstream hardware platform rather than as a "geek workstation" for CAD / Scientific analysis.
December 4, 2002 11:40:23 AM

If you would like a technical brief check out arstechnica.com they have a good article about HT and smp and normal processing. I definitly agree about HT not being 2 processors in 1. Its more like 1.5 since only thing it improves is that it tries to maximize instructions handled by the front end of the CPU (minimize bubbles).

:tongue: <b>If it aint broke, <font color=red> overclock </font color=red> it</b>.
December 4, 2002 6:58:00 PM

Quote:
I definitly agree about HT not being 2 processors in 1. Its more like 1.5 since only thing it improves is that it tries to maximize instructions handled by the front end of the CPU (minimize bubbles).

That's it! You've just given me the perfect answer. HT is like having 1.1 processors, like surround-sound is having 5.1 speakers! HT is the subwoofer! :) 

<A HREF="http://forumz.tomshardware.com/community/modules.php?na..." target="_new"><font color=red>Join</font color=red> <font color=blue>the</font color=blue> <font color=green>THGC</font color=green> <font color=orange>LAN</font color=orange> <font color=purple>Party</font color=purple>!</A>
!