Understanding Hyper-Threading and Virtual Processors

Understanding Hyper-Threading and Virtual Processors

There is a lot of confusion about what Hyper-Threading is and what it can do. I’ve developed an example that might help understand how this technology works.

The semi-truck is used to do transportation work. The vehicle consists of a tractor and trailer.

Together these represent “are like” the physical CPU and the work being done. Hyper-Threading is like an additional physical trailer but no physical tractor. The single tractor with the physical-Trailer and the physical Hyper-Trailer together represent two logical-Semi-Trucks.

Image now that your job is to transport the two loads from Houston to Dallas but you only have the one tractor. That is equivalent to one physical CPU with Hyper-Threading. The four-hour trip will take eight hours to move both loads. (ignoring dead-heading time)

Now add virtual CPU to the mix. The definition of a virtual processor is “it doesn’t exist but you can see it”.

 Now we have a load but no trailer. The load is real but there isn’t a trailer. Getting this virtual trailer to Dallas requires unloading either the physical Trailer or the physical Hyper-Trailer in order to load the virtual trailer.

The overhead in the loading and unloading of the physical trailers can become expensive increasing the time to move the loads to their destination.

According to VMWare there can be up to eight virtual-Trailers for each real and each Hyper-Trailer. There are now eight virtual-Trailers ready to be moved from Houston to Dallas with the one physical tractor. It will take a long time to move the eight virtual-Trailers even ignoring any overhead. There can be benefit found in using more virtual processors than there are physical-hyper processors. The only way to make that determination is by experimenting with various loads. There’s only a minor benefit of having many virtual-Trailers in the world of physical-Semi-Trucks.

This example or metaphor breaks down because computers are driven be events that can provide an environment where hyper-threading and virtual-CPU’s can work in limited numbers. Properly managed virtual-Processors can improve throughput but the performance will never approach a linear result.

To view or add a comment, sign in

More articles by Gordon Morrison

  • Improving Decision Making Software

    The X-Axis is thousand lines of code. VS Merlot produces a uniquely structured application (Dtangle(tm)) that improves…

    8 Comments
  • Software Oscillations

    When I was building the simple robot arm simulator, I describe in my book I ran into an interesting problem. I was able…

    1 Comment
  • It's about time

    I wear a hat that says “I invented Multi-Core and Hyper-Threading Technology US Patent 4,847,755”. I added the…

    1 Comment
  • The Calf Path - Sam Walter Foss (1858-1911)

    This is a poem from over one-hundred years ago; plus. It does a good job of explaining why it's so difficult to get any…

    2 Comments
  • A Fundamental View of Software Architecture

    Traditional software is on the left. More than likely it's the software you work on.

    2 Comments
  • Real-Time Performance from Multi-Core and Hyper-Threading

    Operating systems and compilers do a very good job of optimizing performance in a general way. When maximum performance…

  • Software Architecture Today

    The current structure of software architecture is dominated by the if-then-else (ITE) structure even in the…

  • Agile: lipstick on a pig.

    The title is not referring to agile as being bad. Agile is the lipstick.

  • Temporal Engineering - ETL

    The last post showed an example of 30 to 107 ratio of code reduction for the same problem. You are probably wondering…

  • Do you Really want to Improve the Quality of Software?

    Think of software as a bucket of nuts, bolts, and washers. There's no order, the bucket's contents appear to be random.

Explore content categories