Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Intel Hardware

Hyper-Threading Explained And Benchmarked 245

John Martin writes "2CPU.com has posted an updated article about Hyper-threading performance. They discuss the technology behind it, provide benchmarks, and make observations on what the future holds for hyper-threading. It's actually an easy, interesting read. Of note, they'll be publishing Part II in the near future which will detail hyper-threading performance under Linux 2.6. Hardware geeks will probably appreciate this."
This discussion has been archived. No new comments can be posted.

Hyper-Threading Explained And Benchmarked

Comments Filter:
  • SMT (Score:2, Troll)

    Simultaneous Multithreading (SMT) is not a new idea, although no one to my knowledge has implemented it yet. Intel just calls it "Hyperthreading"...it is essentially SMT.

    And yes, this is a very good idea. A modern superscaler out-of-order processor, like the Athlon and Pentium Pro (and later), can issue and retire multiple instructions per clock cycle. However, it can *only* do this if there is enough instruction-level parallelism (ILP). Turns out, there is not enough ILP in current programs to take full a
    • Re:SMT (Score:4, Interesting)

      by John Courtland ( 585609 ) on Wednesday January 07, 2004 @04:28AM (#7901395)
      Yeah, this is the idea behind the new Cell architecture in the PS3. Dumping the old ideas of having a single threaded model and doing everything in multiple threads where global data can be dynamic with each thread containing its own local storage. Done properly, it's blazingly fast. Done poorly, and you end up with race conditions, blocking semaphores, and generally poor code and poor performance. The only problem is that using the paradigms we have today, very few are capable of programming this style right now. The closest people I can think of are the Michael Abrashes, optimization zealots (not saying it's a bad thing), who know their processor upside and down and are not afraid of assembler, or rescheduling instructions to get the most power out of each cycle, instead of letting an optimizing compiler do it for them.
      • Re:SMT (Score:3, Interesting)

        by jtshaw ( 398319 )
        You right, very few people can code a program that works well on an SMT processor. It is a lot to keep track of and quite honestly, most of the code I have seen churned out at software companies was done in such a rush because of deadlines the programmers didn't have time to optimize there code.

        However, there is no reason why you can take two single threaded processes and use one to fill the holes in the pipeline left by the other so SMT should still have a decent benifit if the kernel scheduler is prepar
        • Re:SMT (Score:3, Insightful)

          by sql*kitten ( 1359 ) *
          most of the code I have seen churned out at software companies was done in such a rush because of deadlines the programmers didn't have time to optimize there code.

          I would argue that in the vast majority of cases, processor-specific microcode (as opposed to language and algorithmic) optimizations aren't the programmer's job - that's what a compiler is for. A professional-grade compiler like MIPSpro or ICC can generate code over twice as fast as GCC on the same processor, because it's smarter about process
          • Re:SMT (Score:3, Informative)

            by jtshaw ( 398319 )
            That is totally true. Processor-specific microcode optimizations are definitly the compilers job. But you have to conceed the fact that the compiler can only do so much. If the programmer doesn't choose a good method or solving the problem at hand there isn't much a good compiler can do to optimize the code, especially if the problem being solved is complex.

            Compilers simply can't be asked to pick up the slack for programs written with a poor logical flow. They can't be ask to figure out a completely di
            • Re:SMT (Score:3, Informative)

              What you wrote here is almost verbatim what Michael Abrash said in his book "Zen of Code Optimization". Dr. Dobbs Journal actually offered it up for free in PDF format at one point, I can only hope to find it amongst my mass of CD's.

              Smart code will do more for you than hand optimized assembler, unless you already have written smart code.
          • A professional-grade compiler like MIPSpro or ICC can generate code over twice as fast as GCC on the same processor, because it's smarter about processor-specifics.

            gcc 3.3.2 beats the pants off icc 8.0 on my SSE2 code. Up to a 50:1 ratio on speed tests, 4:1 on average. With earlier revisions of gcc and icc the ratio was 2:1 with icc being faster. This code is written with explicit parallelism so all the fancy loop unrolling icc does doesn't help, and the register allocation algorithm in gcc seems to be th
      • Re:SMT (Score:5, Interesting)

        by nikh ( 123374 ) on Wednesday January 07, 2004 @09:24AM (#7902429)
        Just to clarify here, this is not the same idea as the Cell architecture.

        The Cell architecture (which may or may not be used for the PS3) is a multi-processor system designed for scalability; It really does have several processors running at the same time. In contrast, 'Hyperthreading' runs multiple threads on a single processor's core.

        They both require multi-threaded code to achieve performance improvements, but fundamentally they're really quite different, and yield quite different price / performance trade-offs.
        • So then they are going to use seperate silicon for each? I guess that would be better, if one unit fails you don't lose the computer. I'm sorry to not have made that distinction, but as you note, the programmatical method is the same or at least similar for both. You must compartamentalize your code into various non-blocking threads to yield a good amount of explicit parallelism to really see any benefit.
      • Re:SMT (Score:5, Interesting)

        by Radius9 ( 588130 ) on Wednesday January 07, 2004 @10:14AM (#7902724)
        Being a console programmer, and having done quite a bit of work on the PS2, there is something in your comment that is a common misperception. You say that hyperthreading works great when you have people who know their processor upside and down and are not afraid of assembler, well, I am not afraid of assembler, and have done quite a bit of it. The problem is that writing in assembler tends to be slow, especially when trying to do heavy optimization. This takes time, a luxury generally not available to those of us in video games who tend to have hard christmas deadlines to ship our product. For Sony to assume that people are going to learn how to program in assembly is a mistake, as learning assembly isn't the issue, having the time to optimize the code in assembly is the issue. This isn't helped by the fact that most of the tools made available to us are piss poor, which makes working on the code much more difficult. For example, the PS2 has the vector units that are generally programmed in assembly. Not only do you need to make sure that the processing done by the vector units synchronizes with your main CPU, but you don't have ANY sort of debugging capability on these. Because of this, programming vector unit code is incredibly slow.

        In addition, video games are things that don't always lend themselves particularly well to running in multiple threads. I have my artificial intelligence code, collision & physics code, and my rendering code. These 3 parts are the main parts of the code that take roughly 90-95% of the total CPU time available to me. I can't run collisions and physics until after the AI has run, and I can't run my rendering until the collision & physics have been run. I can multi-thread individual game objects, but even these constantly interact with each other. This isn't normally a problem if you double buffer it in a way that, for example, after the AI has run, I keep the current frame's AI output around somewhere while I run the next frame, but this requires additional memory, another resource that is scarce on consoles.
        • Not saying assembler is the end all be all, but I don't know of another programmtical model that really does a good job of encompassing the scheduling necessary to program for a simultaneous multithreaded processor.

          I understand the need for single threaded performance, it does seem hard to break a game down into enough parts to really benefit from massively multithreaded architectures. I mean, all you really have is input, video, sound, physics, AI and rules (I seperate physics from rules because physics
        • Assembly sucks? (Score:3, Informative)

          by dmelomed ( 148666 )
          Not to be specific about SMT. Assembly too hard? You people haven't heard of Forth, right? Just use ficl, or some other embeddable forth instead of assembler, will save you lots of time. Better debugging too, since forth is interactive.
    • Re:SMT (Score:2, Informative)

      by at_18 ( 224304 )
      A short but informative article about SMT is on Wikipedia [wikipedia.org]
  • Interesting. (Score:5, Informative)

    by Anonymous Coward on Wednesday January 07, 2004 @03:58AM (#7901277)
    There was an interesting discussion on the Plan9 newsgroup about hyperthreading recently, read here [google.com]
    • by Gleng ( 537516 ) on Wednesday January 07, 2004 @04:32AM (#7901404)
      Cool, that explains it a little.

      I was actually trying to explain hyperthreading to someone today. I got about three minutes into the discussion and realised that I had absolutely no idea what I was talking about.

      The discussion arose because we were talking about stupid salesmen. I saw a salesman in a shop the other week, trying to explain hyperthreading to a lady with a glazed expression on her face.

      He was saying that hyperthreading makes it easier to use two monitors on your PC.
      • This could be analogous to two people in moderate shape being able to pile more wood in total, than a single person who's in great shape.
        hmm... in 6 years of architecture research i have never heard anyone talk about SMT like that. it's not even analogous :)
        • Re:From the article: (Score:5, Informative)

          by Glonoinha ( 587375 ) on Wednesday January 07, 2004 @09:38AM (#7902506) Journal
          How about two people in moderate shape being able to push wood through a single wood chipper than a single person who is in great shape (assuming the wood is piled up 18 feet away = cache miss).

          The single wood chipper being analogous to the actual processing part of the core, is only going to be able to shred so much wood - but if two people fetching wood from the woodpile can keep it running at 100% capacity they will shred more wood than a single guy running back and forth to the wood pile by himself.
          • More correct:

            We start with one wood chipper, one wood chipper operator and a pile of wood. We can chip (whatever) per unit time.

            We make the chipper faster, and can do more (increase clock speed of processor), but at some point the operator can't bring us the wood. So, we use a wheelbarrow to transport more wood in a go, and we keep the stack next to the chipper (a cache).

            Now, there's plenty of wood, so we get a SECOND chipper. The operator can stick wood into whatever chipper is free (multiple ALU units,
      • ...is that the used-car salesman knows when he's lying.

        There's a really interesting philosopical point here, BTW. If you are chartered to (or are pretending to know) something that you don't really understand, can you really claim that you didn't lie (because you didn't realize what you said was false) or do you have a responsibility to be correct if you offer yourself as an authority on a subject?
  • Intel's Whitepaper (Score:5, Informative)

    by Cebu ( 161017 ) on Wednesday January 07, 2004 @04:02AM (#7901295)
    For those more technically inclined I would suggest reading Intel's Hyper-Threading Technology Architecture and Microarchitecture whitepaper [intel.com] instead.
  • by Anonymous Coward on Wednesday January 07, 2004 @04:10AM (#7901322)
    "they'll be publishing Part II in the near future"

    Part II should've been published concurrently, using idle time... tch!
  • by photonic ( 584757 ) on Wednesday January 07, 2004 @04:14AM (#7901332)
    The article claims to talk about the technical details of hypertreading. At first glance, however, it seems more like yet another article in the series "Athlon beats Pentium at Doom by 1/2 frame per second".

    If you are really interested in the how and why of hypertreading in suggest you read trough the lecture notes of Computer System Architecture [mit.edu] at MIT OpenCourseWare. This gives you enough background to race trough all the articles at Ars Techica et al.

  • Celery (Score:4, Insightful)

    by Chris Siegler ( 3170 ) on Wednesday January 07, 2004 @04:25AM (#7901376)
    We saw a whopping 30% decrease in encoding time with HT enabled on the 3.2GHz P4C. We were using an application that is certainly multi-threaded in TMPGEnc, so each logical processor had plenty of work to do and they both had plenty of bandwidth available to share.

    That's pretty cool, but if your primary concern is encoding, then there are some things to keep in mind. A Celeron is much cheaper than a P4 with the hyperthreading ($90 for a 2.6GHz Celeron, and $170 for a P4 2.6C). And if the app you're using doesn't support HT, then a Celery will likely encode faster than a P4 with HT on. HT can also reveal nasty bugs in some drivers (my HDTV card is an example). So unless you're playing games, the P4 is just added expense.

    • Re:Celery (Score:5, Informative)

      by turgid ( 580780 ) on Wednesday January 07, 2004 @05:09AM (#7901507) Journal
      A Celeron is much cheaper than a P4 with the hyperthreading

      So it is, and it's not all that fast either [anandtech.com]. Then again, you shouldn't believe all that you read on the Intarweb.

    • I think the logic is wrong here. Even if HT is enabled with a program that doesn't take advantage of it, usually it isn't a noticible liability.

      One can still turn off the HT. With only a 128k cache, IMO, it is too much of a performance liability to make it worth the lower cost.

      I just leave it on because the system seems to respond a little better under heavy load.
    • Re:Celery (Score:3, Insightful)

      by Glonoinha ( 587375 )
      $80 difference on a $700 machine (assumes a usable amount of RAM, a real video card, a usable performance hard drive, and a legit copy of XP Pro (XP Pro gives you the best performance on the SMT chips, I have seen roughly 5%-10% gains)) means that for every 8 P4 2.6GHz HT machines you were going to buy, you can buy 9 Celeron 2.6GHz machines. Even if you go display-less (no monitors) and use a free OS (Linux or recycled Win2000Pro CDs) you are talking $500 absolute minimum, you are talking 7 Celeron boxes f
  • Wrong percentages? (Score:5, Interesting)

    by OMG ( 669971 ) on Wednesday January 07, 2004 @04:29AM (#7901398)
    I think they made a mistake here.
    From the article:
    "Sandra's CPU benchmark is obviously quite optimized for hyperthreading at this point, and the numbers certainly show that. We see an average improvement of ~39% when hyper-threading is enabled on the P4 ..."

    The numbers are:
    4328 without HT
    7125 with HT

    You could say that disabling HT makes this benchmark 39% slower. But the the increase by turning HT on is
    7125/4328-1 = 1.646 - 1 = 0.646 = 64.6 %

    Hrmpf.
    • This guy can't even calculate his percentages correctly, so I wonder what else might be screwed up in his analysis?

      If X is the lower number and Y is the higher number, he's figuring his percentage increases as (Y-X)/Y instead of (Y-X)/X .

      Or is this some kind of "New New Math" that they started teaching in the 10 years since I graduated?

    • by Glonoinha ( 587375 ) on Wednesday January 07, 2004 @10:02AM (#7902655) Journal
      Crap you are right - just by turning on HT on the same box he saw a 65% boost in performance.

      I think it was a case of -wanting- to see a specific number and juggling things in his head until he got the number he wanted. Intel touts the 30% range and if he initially got the 65% number he probably discarded it and kept juggling the books to get the number in the 30's that he wanted.

      As someone that has a P4 2.4 (not HT) box sitting right next to a P4 2.4 (HT) box I will assure you that in real life you are not going to see a 65% sustained boost in performance in day to day use. Not 30% sustained boost either, unless you are only running apps that are heavily optimized and multithreaded.
  • by keeboo ( 724305 ) on Wednesday January 07, 2004 @04:33AM (#7901410)
    I do believe that HT does have future, perhaps not in its present form, but still.

    I do remember when there was that RISC vs CISC thing in the 80s, people were saying that CISC was obsolete, RISC being the future and so on. What we see today is not pure RISC processors but something in between. -- It's just that the answer was not that pure or clean as people thought at first.

    Few years ago there was BeBox and its BeOS. Well, BeOS had the philosophy for a machine not having a single super-powerful-burning-hot processor but, instead, several low-power combined.
    Well, Hyper-Threading may push distributed processing technology to the desktop, to the masses, so we might have interesting changes in software and hardware philosophy in the future.

    Sort of romantic thinking... But one can dream. :)
    • by putaro ( 235078 ) on Wednesday January 07, 2004 @05:04AM (#7901495) Journal

      All things being equal, RISC gives you more bang for your buck. The difference is that Intel has pushed CISC, or specifically the x86 architecture, as fast or faster than RISC by using more bucks. The amount of R&D dollars powered into x86 vs the amount poured into PowerPC or Alpha is overwhelming.


      When I was at Apple our processor architect, Phil Koch, gave a talk in, I think, 1997, where he said that the PowerPC consortium had essentially optimized for power consumption and dollars spent on R&D. What was amazing at that time was that PowerPC was competitive with Intel given much lower power consumption and much lower investment of R&D dollars. However, noone really cared about lower power consumption so it didn't translate into any real advantage. Without the R&D dollar leverage given by RISC, however, the PowerPC would not have been able to compete at all. Pushing the 68K architecture to be competitive with Intel with the same R&D dollars as PowerPC would have been impossible

      • And nowadays it becomes more and more clear that there isnt much of an advantage anymore.
        All "Cisc" chips are risc cores with a decoder frontend, and the "cheaply developed" Power PCs before the G5 were slaughtered by X86 in any bench but photoshop gaussian blur.

        And the G5 is only a sideproduct from IBMs Power4 program, which cant really be descriped with "low R&D expenses".
      • by Waffle Iron ( 339739 ) on Wednesday January 07, 2004 @10:19AM (#7902754)
        All things being equal, RISC gives you more bang for your buck.

        Maybe, maybe not. However, it's hard to tell because nobody makes RISC or CISC processors anymore. The RISC concept, implemented in CPUs like the MIPS R3000, originally meant very simple hardware without pipeline interlocks, instruction schedulers, or more than an absolute bare-bones set of instructions. The current Power PC does not match this at all; it is closer to the current X86.

        By the same token, CISC used to mean that many or most instructions were implemented in microcode on the processor. Once again, that's no longer the case. All X86s now have a RISC-like core and resemble the Power PC far more than the 80286.

        Pure RISC designs and pure CISC designs have both been superceded by a hybrid approach, and neither one would be competetive today outside the embedded device market.

        Basically, you were being fed a line of company FUD to get you all excited about their choice of CPU. Today, cache memory dominates the chip real estate, and CPU performance and power consumption are dictated almost exclusively by cache size and silicon process technology rather than these surface architectural details.

        • The RISC concept, implemented in CPUs like the MIPS R3000, originally meant very simple hardware without pipeline interlocks, instruction schedulers, or more than an absolute bare-bones set of instructions.

          Not true at all! RISC refers to the instruction set, not the internal architecture. Even the earliest RISC processors to carry that name included pipeline interlocks -- it was the simplicity of RISC that made such techniques feasible, especially at the chip densities of the 80's.

          There's a lot of con

      • CISC processors tend to have smaller code size, even if the execution units are similar. You can think of this as CISC having a decompression engine between icache and the execution units. When main memory is slow and far away, reducing the amount of memory needed for code can be helpful, especially in modern (bloated?) systems with zillions of bytes of shared libraries loaded.

        Here's [yarchive.net] a ref to a discussion of RISC's response to this problem.
    • I remember the period when Digital was developing the Alpha to replace the CISC cpus in Vaxen.

      Nice chip, but relegated to the history books now.
    • RISC was another buzzword, like microkernels, XML, Java, XP, etc. It was the wave of the future -- the magic bullet that would let you get "Mainframe performance on a desktop computer." Just like the 386 was going to finally give you "Mainframe performance on a desktop computer," and the 486 was going to give you "mainframe performance on a desktop computer." I have to wonder how many IT departments bought the hype and made a switch, only to discover that they weren't really running all that much faster.

      N

  • oh goodie! (Score:2, Funny)

    by Anonymous Coward
    an extra frame or two for Doom3!
  • Cache Contention (Score:4, Interesting)

    by Detritus ( 11846 ) on Wednesday January 07, 2004 @04:59AM (#7901477) Homepage
    Do any modern chips support per-process cache reservation? That would alleviate some of the problems reported in the article.
  • by obergeist666 ( 727955 ) on Wednesday January 07, 2004 @05:27AM (#7901553)
    ... I learned from this article [arstechnica.com].
  • Quick Q (Score:5, Interesting)

    by AvengerXP ( 660081 ) <jeanfrancois,beaulieu&mckesson,ca> on Wednesday January 07, 2004 @05:33AM (#7901567)
    Why would you want to have a virtual double processor when... you can actually get a second one? Both changes require that you change your motherboard (One for HT, one for Dual Sockets). Dual Celerons sounds like a good cheap buy, or even Dual Athlons. Why bother with this? Except for the coolness factor of having your POST screen littered with "Hyperthreading Enabled", and in most cases it's not even called that, i forgot what they really write on the screen. Seriously, i wouldnt put my money that HT will be even copied to other manufacturers any time soon, unlike SSE or MMX.
    • Re:Quick Q (Score:5, Insightful)

      by renoX ( 11677 ) on Wednesday January 07, 2004 @07:36AM (#7901957)
      > Why would you want to have a virtual double processor when... you can actually get a second one?

      Because it is cheaper?
      SMT increase very little the size of the CPU and can give some good improvements (depending of the application, and the OS as said in the article).

      SMT can work in the same motherboard as a single CPU contrary as what you said..

      And for the same price, the single CPU performance of your dual-CPU setup will be lower..
      • Re:Quick Q (Score:3, Interesting)

        by iconian ( 222724 )
        It's not that simple. I believe the cheapest HT processor from Intel is the P4 2.4 Ghz, priced at $161 [newegg.com]. You can buy one Athlon XP 2400+ for $75 [newegg.com]. A dual processor Athlon motherboard probably costs more than a single processor Pentium 4 motherboard and you will probably have to pay for a bigger power supply unit. However, I don't think dual logical processors in a single Pentium 4 can beat 2 real Athlon XP 2400+ processors performance wise and in performance-price ratio. (Note: I do not work for NewEgg.)
    • Cost (Score:2, Informative)

      by Imperator ( 17614 )
      Cost, cost cost. Cost cost cost cost cost, cost cost cost cost cost cost. Cost cost cost--cost! Cost cost cost, cost cost cost cost cost cost...cost cost. Cost cost "cost" cost cost cost cost cost cost cost cost. Cost cost cost cost cost COST cost cost.....

      The lameness filter blows. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo conse
    • Re:Quick Q (Score:2, Interesting)

      by Ramze ( 640788 )
      I believe AMD has plans to incorporate more than one CPU on-die in the future. First 2, then 4, etc.

      It'll be interesting to see what happens to "hyperthreading" when dual and quad processors come standard on desktop systems for home users.

      I look at Hyperthreading as a quick hack to improve response times on a few things. It's a minor speed boost as well, but I think it has enough drawbacks to merit it as only a minor improvement which may not always be a good idea to have enabled. I doubt it will st

    • AMD claims to have the same idea in the works for the next Athlon 64.

      It was supposed to be put into the Alpha processor too, a lot of HT research was done on it and was transferred to Intel.

      Most of the CPU players are toying with dual full CPU on-die as well, but keep in mind that HT accounts for under 5% of the die, rather than just requiring a second die.

      So you _can_ also have two real processors and two more processors in virtual mode. If you know the Xeon line, the Xeon DP allows two real processor
    • It's more obvious if you scale it up to more CPU's.

      It actually makes more sense to build one chip that's, say, 8 logical processors and give it several execution units of each type (i.e. 6 integer math units, 4 floating point units, etc.) depending on instruction mix. Of course, that eats chip real estate, but if you have a multithreaded system to run, it will scream.

      If you put in 8 distinct processors, that's 8 integer math units, 8 floating point math units, etc. some percentage of which are idle mos

    • by joss ( 1346 )
      I could get a dual athlon system, but then I wouldnt be able to hear the dog barking
    • Nope - I have a Gigabyte GA-8PE667 Ultra which can use a 3.06GHz HT P4, a 1.7GHz Celeron or anything in between.[*]

      Also, SMP boards seem to be 2-3x the cost of UP boards before the cost of the CPUs.

      [*] FSB speeds permitting. It does 400MHz and 533MHz FSB speeds, but not 800MHz.

      --

  • by xyote ( 598794 ) on Wednesday January 07, 2004 @05:36AM (#7901580)
    Threads using hyperthreading or SMT share the cache. This can be a problem if the threads are from different processes and not sharing memory. Your cache is effectively halved (with 2 hyperthreads). On the other hand, it could be a real benefit if your threads were from the same process sharing the same memory. You don't have the cache thrashing which could occur on a multi-cpu system. Since cache hits can really kill performance, this could be quite a performance boost.

    To really exploit this, you'd need gang scheduling in the operating system. But it's unlikely that SMT would remain around long enough for any efforts to exploit it to be feasible. CMP with separate cache would likely take over before then since it would behave more like separate cpu's from a performance standpoint and thus offer more consistent behavior.

  • by sam0ht ( 46606 ) on Wednesday January 07, 2004 @05:48AM (#7901607)
    From the article: "As bus speeds increase, and more cache becomes available on die, hyper-threading is going to be more and more efficient. It appears to be somewhat of an engineering symbiotic relationship."

    Unfortunately, historically CPU speed has increased faster than memory bandwidth. That's why we've had ever more layers of cache added to our systems, to make up for the relative deficiency.

    Unless things change, a technology that works better with a higher ratio of memory bandwith / CPU speed is likely to become progressively less, not more effective.

    Of course, there's always the argument that marketing reasons have pushed CPU clockspeed faster than memory bandwidth, and that Intel et al will just shift their focus more towards memory in future. But defying the tide of 'what people think they want' is usually risky.

    • by sql*kitten ( 1359 ) * on Wednesday January 07, 2004 @06:42AM (#7901750)
      Unfortunately, historically CPU speed has increased faster than memory bandwidth. That's why we've had ever more layers of cache added to our systems, to make up for the relative deficiency.

      Aye. Sun has big plans [sun.com] for CMT, which one of their sales reps was quick to tell us all about, up to 32 SPARC cores on one chip. That'll work well in the lots-of-small-tasks model where you can take advantage of direct access (say between disk cache and network card) on FirePlane with very simple code (like a webserver) that can execute out of the processor's cache. But we're heavy database users, and the first question he got asked was, are you seriously telling us Sun is about to makes its memory bandwith an order of magnitude greater? He couldn't answer that question. Now, that means either he was clueless, or Sun is jumping on the Intel benchmark bandwagon.
    • by davecb ( 6526 ) * <davecb@spamcop.net> on Wednesday January 07, 2004 @08:53AM (#7902269) Homepage Journal
      One of the reasons for hyperthreading (aka chip multithreading) is the slowness of memory and cache.

      If you refer back to Marc Tremblay's CMT Article [aceshardware.com], you'll see that one of the approaches is to run one thread until it blocks on a memory read, then run another until it blocks and so on, repeating for as many threads as it takes to soak up all the wasted time waiting for the memory fetches.

      The Sun paper on their plans for it is here [sun.com]. Have a look at page 5 for the diagram.

      --dave (biased, you understand) c-b

    • When parallelism is introduced you run the risk of "process inversion". If the system runs high enough all of your execution units are working as fast as the slowest process no matter how fast the execution units can run.

      The key to this effect is that the slowest execution unit is taking the most time forcing all other execution to wait on it. Other faster execution units must wait for one reason or another so they all appear to be as slow as the slowest.

      In software you can try to soften the blow by bum
    • Another way to increasing apparent memory speed is for a wider effective memory bus. It was IIRC, 16 bits 286 and before, 32 bits with 386, 64 bits with Pentium, and with selected PIII, PIV, Athlon & A64 boards, dual channel 64bits, making it 128 bits.

      I think an Alpha board or two went as high as 512 bits wide.

      Now, the wider memory bus doen't help x86 or A64 as much as one would think but with hyperthreading, it might.
  • by ZombieEngineer ( 738752 ) on Wednesday January 07, 2004 @06:36AM (#7901725)
    I have found HyperThreading a real boost for developing operator training simulators (think giant custom computer game for process plant operators [eg: Oil refineries, gas plants, chemicals, etc...]) where the a single thread will totally consume the resources of a single CPU (we call it "no-wait" where the simulation calculates what happens in the next 2 seconds and then immediately jumps to the next timestep, thus fast forwarding through slow parts of a process start-up such as warming a reactor).

    An issue we encounter is the DCS (Distributed Control System) interface (the bit that links the PC to the fancy membrane keyboards, touch screens, alarm annunciators that the operator uses on the real plant [to maximise training benefit]). Although the interface typically only uses 0.5 to 2% of the CPU, when the simulation goes flat out, there is a noticable impact on other threads to the point where there is timeouts on data requests from the operator console.

    In summary, if you have a system where some threads are IO bound (in our case, processing requests coming across via ethernet) and other threads are CPU intensive (high end numerical calculations) you will see a definite benifit. It allows us to give every team member a machine fit for the job at approximately 1/3 the cost (those of you who wish to argue that SMP machines are cheaper, we are bound by corporate purchasing agreements where SMP falls into the "Workstation" catagory while a uni-processor HT machine falls into the far cheaper "Desktop" catagory).

    If you are performing just purely calculations and need to run two parallel threads, I would recommend a SMP or similar machine.

    As always your milage may vary.

    ZombieEngineer
    • OK, you are doing all this calculation in another thread, but you have to somehow synchronize with the GUI thread (PostMessage under Windows). If your calculation thread were to run faster than your GUI thread (GUI doing a lot of screen updating), you would get these PostMessages clogging up your GUI thread message queue because WM_PAINT is of very low priority (so frequent paints don't lock out key and mouse clicks).

      In the old single-processor days, your calc thread could do a Wait(0) -- according to th

  • HT is awesome (Score:5, Interesting)

    by Jeppe Salvesen ( 101622 ) on Wednesday January 07, 2004 @07:25AM (#7901907)
    In the app we develop here at work, we are highly conscious of performance and scalability. Simply put - the more transactions we can process, the bigger and happier the customers. And more money in our pockets.

    With Xeon with HT, our performance has increased quite dramatically. We use Perl, so we simply fork off the jobs that do the processing. The result is that we fill all the four virtual processors in Linux if we have a sufficient number of jobs running.
    • In the app we develop here at work, we are highly conscious of performance and scalability. [...] We use Perl [...]

      Huh? This is not meant as an offense, or a troll, but that really, really doesn't fit together. Have you considered using something faster (no, not C)? This should have a much bigger effect than a HT proc.

      • Absolutely. But Perl means we can produce more software with fewer manhours and fewer lines of code! Compared to our java-based competitors, we kick butt, both in terms of development team size and in terms of performance and TCO.

        We have profiled our code and optimized the code where we spend most of our time. On those critical sections, we use most of the tricks in the book - dynamically created code, extensive use of hashes, etc. We can even write functions in C using XS if we want to!

        Basically, Perl is
  • by Pivot ( 4465 ) on Wednesday January 07, 2004 @07:38AM (#7901962)
    I have a computer with dual Xeon 1.7GHz. Those apparently have HT capability built in, but it's not enabled in the BIOS. Anyone know a way to circumvent this to enable HT on these?
  • by Anonymous Coward on Wednesday January 07, 2004 @08:09AM (#7902072)
    When a process blocks because it is trying to access memory that is not loaded into the cache, it sits idle while the data is retrieved from the much-slower main memory. If you can store two process contexts on the CPU instead of just one, whenever one process blocks to read from memory, the operating system can quickly switch the CPU to the other context which is waiting to run.

    I can't remember the name of the machine, but one parallel shared-memory machine used this exclusively. The CPU had 128 process contexts and would switch through them in order. The time between subsequent activations of each context was great enough that data could be fetched from main memory and loaded into a register. This eliminated cache coherency problems (no cache!) and all delays related to memory fetching.

    A P4 with hyperthreading is a simplified and much more practical version of that machine.
  • by awol ( 98751 ) on Wednesday January 07, 2004 @08:53AM (#7902273) Journal
    I did comp sci (undergrad) in the days when we used unix/VMS to learn and so I have a pretty good understanding of architecture and the basics of threads and processes. The one thing that never sat well with me was that as processor speed "exploded" in the last 5 years, I was under the impression that a "lot" of the performance increase was achieved by parallelising stuff in the execution core. (You can see that my knowledge is _limited_) So as a result unless your applications could somehow take advantage of this parallelism a given bit of code would never really get the full benefit of todays uber processors. So all the speed gains were only really marginal improvements.

    I think the advent of SMT confirms that it is indeed the case that a given process cannot of itself (unless it is _real_ special) take full advantage of a modern processor and so SMT is a way of reducing the problem by assuming that whilst one process aint enough to take full advantage, two processes are able to make more advantage. It sure makes sense to me.

    But it also presents the very interesting question of the marginal benefit of execution pipelines compared to complexity in the front end to allow SMT. What I mean is, what are the trade offs between having a "virtual" (for want of a better word) processor for each execution pipepline rather than using them to out of order execute parts of a single stream of instructions. Is it simply a question of the nature of the work being undertaken my the machine? Ie a processor with 8 pipelines serving 20 users doing stuff, would it be better doing 1 bis of work from each of 8 users or maybe 2-4 bits of stuff from 4-2 users. And can we answer that question heuristically to allow the front end to make good use of each pipeline with a variable profile over the chaing use of the machine. Fascinating (well to me anyway).
  • Analogy (Score:4, Interesting)

    by attonitus ( 533238 ) on Wednesday January 07, 2004 @09:15AM (#7902377)
    This could be analogous to two people in moderate shape being able to pile more wood in total, than a single person who's in great shape

    Could be, but isn't. A better analogy would be two people using the same narrow corridor to perform to chop and pile wood. If one piles wood, whilst the other chops, then they perform better than one person. If they both chop wood, and then both pile wood then they waste lots of time trying to squeeze past each other and accidentally hitting each other with axes.

    Okay, so it's not that much better an analogy. But it least it bears some relevance to HyperThreading.

  • by pw700z ( 679598 ) on Wednesday January 07, 2004 @09:30AM (#7902466)
    I use VMware workstation extensively... and HT rocks. Ever have a virtual machine go to 100% CPU utilization, and your machine slow down to a crawl? With the extra 20% of cpu available, you system can still function and be responsive, and allow you to deal with whatever is going on. Or I can run two VMs and get much better performance out of them and the system as a whole.
  • HT Technology (Score:3, Informative)

    by sameerdesai ( 654894 ) on Wednesday January 07, 2004 @10:23AM (#7902785)
    I have some insight into this technology as I was part of a research group researching SMT. It is a really cool technology that exposes Instruction level parellelism (ILP) and increases performance. The basic HT technology for the processor however distributes the resources. The details of Intel HT are available here at http://www.intel.com/technology/hyperthread/ You can also find whitepapers associated with this. Now the catch is application should be multi threaded. You just can't buy a HT processors and run single thread application and expect to improve performance. The performance benefits lie if optimal number of threads are used. If too less it will be unnecessary wastage of resources. If too high they will queue up and cause bottlenecks. The other thing that can affect performance is unbalanced workload and can cause threads which cannot exploit the parallelism. This is a new technology and lot of research is going on in this area and it looks really promising.
  • With HT enabled I can run 2 copies of Folding@Home [stanford.edu].

    This is a significant boost in production over a non-HT processor because these programs.

    I would assume this would also help other DC projects like Seti@Home.
  • To folks considering buying HT-enabled processors, be warned that not everything will work when HT is enabled!

    For one, burst!, my BitTorrent client simply crashes on start-up. I've been in contact with Intel about the issue, and after some initial jerking me around, I seem to have finally found a tech who's looking into the issue.. Probably has something to do with my compiler (the crash offset is within the delphi RTL).

    My app is not alone, as others in this thread pointed out, hyperthreading can also tr
  • by glinden ( 56181 ) on Wednesday January 07, 2004 @11:46AM (#7903460) Homepage Journal
    AnandTech did an excellent article [anandtech.com] on hyper threading a while back. Well written and worth reading.

  • by fupeg ( 653970 ) on Wednesday January 07, 2004 @12:06PM (#7903712)
    IBM will have SMT in the Power5 [cbronline.com]. Their approach looks even better than Intel's, but part of that is the Power architecture and part of that is IBM learning from what Intel did. SMT is really the best way to get past the limiting reagents of modern processors : bandwidth.
  • by Animats ( 122034 ) on Wednesday January 07, 2004 @01:10PM (#7904362) Homepage
    The basic problem with hyperthreading is, of course, memory bandwidth. CPUs today are memory-bandwidth starved. 30 years ago, CPUs got about one memory cycle per instruction cycle. Since then, CPUs have speeded up by a factor of about 1000, but memory has only speeded up by a factor of 30 or so. The difference has been papered over, very successfully, with cache. The cache designers have accomplished more than seems possible. Compare paging to disk, which is a form of cacheing that hasn't improved much in decades.

    If you want to benchmark a hyper-threaded machine, a useful exercise is to run two different benchmarks simultaneously. Running the same one is the best case for cache performance; one copy of the benchmark in cache is serving both execution engines. Running different ones lets you see if cache thrashing is occuring. Or try something like compressing two different video files simultaneously.

    If you're seeing significant performance with real-world applications using a a "hyper-threaded" CPU, that's a sign that the operating system's dispatcher is broken. And, of course, hyper-threading dumps more work on the scheduler. There's more stuff to worry about in CPU dispatching now.

    Intel seems to be desperate for a new technology that will make people buy new CPUs. The Inanium bombed. The Pentium 4 clock speed hack (faster clock, less performance per clock) has gone as far as it can go. The Pentium 5 seems to be on hold. Intel doesn't still have a good response to AMD's 64-bit CPUs.

    Remember what happened with the Itanium, Intel's last architectural innovation. Intel's plan was to convert the industry over to a technology that couldn't be cloned. This would allow Intel to push CPU price margins back up to their pre-AMD levels. For a few years, Intel had been able to push the price of CPU chips to nearly $1000, and achieved huge margins and profits. Then came the clones.

    Intel has many patents on the innovative technologies of the Itanium. Itanium architecture is different, all right, but not, it's clear by now, better. It's certainly far worse in price/performance. Hyperthreading isn't quite that bad an idea, but it's up there.

    From a consumer perspective, it's like four-valve per cylinder auto engines. The performance increase is marginal and it adds some headaches, but it's cool.

    • by Brandybuck ( 704397 ) on Wednesday January 07, 2004 @01:47PM (#7904799) Homepage Journal
      If you're seeing significant performance with real-world applications using a a "hyper-threaded" CPU, that's a sign that the operating system's dispatcher is broken. And, of course, hyper-threading dumps more work on the scheduler. There's more stuff to worry about in CPU dispatching now.

      That was my suspicion. Hyperthreading can't be much more efficient than threading via the OS, unless the software is specifically compiled for it, or you use a scheduler specific to hyperthreading. Scheduling work STILL has to be performed, and hyperthreading STILL isn't parallel processing. So where are these performance improvements people are seeing coming from?

      I'm not using Linux, but FreeBSD. When I got my new HT P4, I considered turning it on. Then I read the hardware notes. Since FreeBSD does not use a scheduler specific for hyperthreading, it can't take full advantage of it. In some cases it might even result in sub-optimal performance. Just like logic would lead you to think.

      The OS cannot treat hyperthreading the same as SMP, because they are two different beasts.
  • The author benchmarks a 2.8GHz Xeon with 533MHz FSB and 1MB of L3 cache. and a 3.2GHz P4C with an 800MHz FSB and 0.5MB of L3 cache. He claims he doesn't want to compare the two, but he does. Here are some other conclusions.

    The Xeon has a slower clock, and yet outperforms the higher clock P4C. This is further evidence that MHz isn't everything.

    The P4C has higher memory bandwidth (the FSB) yet slower performance. This shows that on-chip cache can be king over memory bandwidth too.

    Some of my historic

Someday somebody has got to decide whether the typewriter is the machine, or the person who operates it.

Working...