On Saturday 30 August 2003 14:11 pm, Ken Schneider wrote:
-----Original Message----- From: Bruce Marshall
To: SLE Date: Sat, 30 Aug 2003 13:44:42 -0400 Subject: Re: [SLE] For or against ..Hyperthreading. On Friday 29 August 2003 23:57 pm, Ben Rosenberg wrote:
I have partly a question and partly a survey. I just got a P4 2.4ghz (c) proc, mb w/ 512M DDR400 dropped in my lap at work so I could upgrade my workstation in the office. It does have hyperthreading. I've never user HT hardware and I've heard conflicting reports about it. I have it turned off right now and I haven't installed the SMP kernel since I'm not sure I'm going to bother. I guess my question is...for a workstation doing webbrowsing, documents in OO, Gaim, playing mp3's and s**tloads of xterms. Does HT give or take away
from
the enviroment as far as speed and all that. All opinions are
welcome.
:)
No one's taken this on so I'll give it a crack:
I'm going to assume that HT works in a similar manner to having two cpu in SMP formation... (although something tells me that it's not quite that efficient.)
1) Having one CPU that is twice (or close to twice) as fast as two cpu's is always the best way to go.
2) The reason for (1) is that most of your computing time is going to be spent on one task, and in an SMP situation you can only apply 1 cpu to that task at a time. Therefore, a 2Ghz cpu in that situation will do MUCH better than two cpu's of 1Ghz.
Wrong answer! The opposite of this is true. When was the last time you saw your computer running only one task, even DOS did more then one thing at a time. If you compile a kernel or any program and then go and play a game while it is running, 2 cpu's will out perform a single cpu system ALWAYS. I have an SMP system at home with 2 P3-750 cpus that outperforms the single cpu system at work (P41.6).
B-z-z-z-t-tttt!! Thanks for playing.... The answer to your question is "yes, there almost always will be more than one thread running, but are they doing anything? And even if there is more than one thread running, my guess would be that they aren't using much cpu time... ergo, they can't add much to 'speeding up' your system." Example: You want to crunch some numbers with SETI. And also, in the background, your system is going to be doing an updatedb or some other typical maintenance task. Said tasks don't take much computer power. (but use a lot of I/O) Which is going to get more work done for the SETI program? 1 2-Ghz cpu or 2 1-Ghz cpu? Answer: a flat-out no-brainer... the 2-Ghz cpu. And the same applies to your scenario above!! With a 2-Ghz cpu you *ALWAYS* have 2-Ghz of power to apply to a single task (which is usually the case when power is needed) With two cpu's you can *NEVER* apply more than 1-Ghz to a single task... And with the 2-Ghz cpu.. you have a good chance of apply that 2-Ghz over as many tasks as possible that need cpu power. I'll take a single cpu any day over multiple cpu's that DON'T ADD UP TO MORE MIPS than the single cpu. And that was my point.
3) Given that you have (two) cpus so-to-speak, there is not much harm in using HT. There might be a slight addition of system overhead in scheduling two cpu's but that should be gained by the 2nd cpu being able to handle other tasks such as spooling and printing, and all the other system type threads that occur while your doing your own tasks of word processing, etc.
4) On the other hand, since I don't know much about HT, if it takes a 2Ghz cpu and turns it into (mostly) two 1Ghz cpu's by sharing all of the resources in the chip, then it would be best not to use HT.
So in a nutshell, it shouldn't hurt, might help a little, you probably won't notice any difference, and besides, it's a neat conversation piece. :-)
Ken
-- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 08/30/03 16:23 + +----------------------------------------------------------------------------+ "It's a small world, but I wouldn't want to paint it." - Steven Wright