Articles

CPUs, Cores, Threads, what does it all mean?

 

When researching processors these days one runs into talk of Cores, Threads, HyperThreading, Turbo Boost, Turbo This, Hyper That, HT, mhz, ghz, it’s a mess!  This article aims to be a basic guide to what it all means, in as simple of terms as possible. Hit “Read More” to do just that!

 

In the beginning…

There was a CPU, there was no talk of cores, turbo (well sometimes there was turbo, we’ll get to that briefly later), HyperThreading, threads, or any of that nonsense.

The CPU was simple, in essence an overcomplicated calculator, it listened for instructions and when it got them it did what they told it to, one thing at a time, and in the order they were recieved.  By and large, clock speed (here come the mhz…) was the most important factor.  It still is quite important!

 

 

Clock speed!

A CPU (along with a video card, a calculator, and any other digital device) calculates things in chunks, each time a timer goes “DING!” the CPU does something.  Inbetween those dings it does absolutely nothing.

The rate of this dinging is the clock speed, it’s measured in “hertz”, which means roughly “times per second”.  60 hertz is 60 times per second.  A “kilohertz” is 1000 times a second, a “megahertz” is 1,000,000, and a “gigahertz” is 1,000,000,000, also known as a billion.

At this point it should be fairly obvious that a processor that goes DING! a billion times a second will do pretty much anything faster then one that goes at merely a million times a second.  All else being equal this is true, too.

Now the complication:  Different “architectures” of CPU can do different amounts of work in each tick (ding, either way).  If CPU #1 does three things per tick and CPU #2 only does one thing, CPU #2 has to go tick three times more often to get the same amount of work done.
Thus is complication number one!  Now onward to complication number two, “heat”.

 

 

Heat!

Every time the CPU goes “tick”, electricity flows through it.  Electricity being what it is, this means heat is generated.  Inside the cpu are millions to billions of little tiny switches (transistors), and each one of those makes a little bit of heat.  In a modern CPU you have between 300 million and a billion transistors going tick billions of times per second, the end result is somewhere between 45 watts and 130 watts of heat, a fair amount!

The faster they go tick, the more heat is generated.  Too much heat and you have to have a large noisy heatsink and fan, or the CPU will simply melt or catch fire.

The major issue is that higher clock speeds not only let more electricity through the cpu, but also require more voltage.  “Ohm’s law” is that if you double the voltage you don’t double the wattage, oh no!  The wattage goes up by four times.  Raising voltage for higher clock speed brings with it brutal heat penalties (thus died the Pentium 4 architecture).

A way around this is to add more cpus at lower clock speeds instead, bringing us to “cores”.  You double the number of transistors and hence double the heat output, but that beats doubling the voltage and getting four times the heat!

 

 

Cores!

A CPU “core” is, in essense, an individual CPU.  If you buy a CPU with two cores what you are really buying is two CPUs that have been stuck together, same for a triple core, a quad core, or a hex core CPU.  There are various different ways to stick them together but that is beyond the scope of this article.

It should be immediately obvious that this is a large benefit, now the cpu can go tick at half the speed and get the same amount of work done, right?

Yes, sort of.

The issue here is that there are some calculations where you have to wait for the first part to finish before you can do the second.  A simple example is 4 x 6 x 8, you can’t multiply the result of 4 x 6 by 8 until you know that it is 24.  It’s simply impossible.  The result is that the second core sits there doing absolutely nothing at all.

On the plus side, the odds are decent that there is something else worth doing at the same time, a different program or a different part of the same program.

A program that requires calculating things in a specific order is a “single threaded” program, everything is lined up in order like a popcorn chain, and that’s all there is to it.  A program that has multiple things that can be calculated at once is “multi-threaded”.
This brings us to threads, and hyperthreading.

 

 

Threads!

If you have a “dual core” CPU you can calculate two threads at once, nifty!  Now we have twice the performance at a given clock speed, in theory.

Unfortunately there are times when the CPU knows what it wants to do next but can’t, because it is waiting for data to arrive from memory.  This means that the CPU simply sits there and waits, wasting time.

Intel came up with a creative way to deal with this, it is again flat out impossible to calculate something you do not know (actually it isn’t, modern CPUs guess at what you want them to do next and do it before they know whether they are right, but again that’s an advanced topic.  Similarely, a modern CPU can look at what it has lined up to do and change the order it does things for better efficiency.  Again the specifics are a complicated mess), so there isn’t anything to be done for the poor thread who’s data isn’t there yet.  But what about a different one?  Suppose there was a set of data waiting in the CPU for it’s turn to be calculated.  Suppose the CPU knew that it couldn’t work on thread-1 so it looked around until it found something it could do!

Some CPUs can, Intel’s version of it is called “Hyper Threading”, and it works quite well.

Because it’s not actually calculating two things at once it doesn’t double performance, but in most places it’s useful (things with lots of threads),  it adds about 30% performance.

You see HyperThreading on the Core i series of CPUs, they have two, four, or six cores, but four, eight, or twelve threads.

AMD meanwhile took a different route, they simple added more full on cores into their cpus!

Each core can’t do quite as much as an Intel core, but there are more of them at a given price point.  The price you pay for a four core Intel CPU buys you a six core AMD cpu!  And soon, when AMD’s “BullDozer” arctitecture comes out it will get you an eight core cpu, vs the Intel cpu that has eight threads, but only four real cores.

The downside to both techniques is that neither one helps at all for a single threaded program, of which there are still a lot these days.  That brings us to “Turbo”.

 

 

Turbo!

Turbo was initially launched as a feature of 386 cpus back in the 80s, they were far faster then the 286 cpus prior to them (both in clock speed (ticks) and in how much they could do per tick), and some programs ran on them so fast that user input was impossible.  There was a button on the front of the computer then enabled or disabled “Turbo” mode.  In turbo mode the CPU would run as fast as possible, if you disabled it the CPU would run at the same speed as the 286 that came before it.

That, however, is totally different then modern “Turbo Boost” or “Turbo Core”.

Remember the heat issue discussed earlier?  If you have a limit on the number of watts your cpu can put out you have to do a juggling act between more cores at lower speed and fewer cores at higher speed.  The first is best for multi-threaded things and the second is best for single threaded things.

The “Turbo” technologies are an effort to get the best of both worlds, if the CPU notices that it’s only working on a single thread (or two, or three) it turns off the cores that are not being used so they don’t generate heat, and turn the clock up on the remaining cores.  This way they get (almost) the clock speed of a single or dual core CPU for single threaded stuff, and the multi-thread capabilities of a quad core or hex core cpu with the other stuff.

Both Intel and AMD use this now, though neither technique works as well as simply buying a high clocked dual core if you’re only using programs that use one or two threads, most games fall into this catagory.

 

 

The bottom line:

The bottom line is that you need to pick a cpu based on what you plan to do with it. If you plan to play games, odds are a dual core or quad core with a high clock speed will be best.

If you simply browse the internet and do word processing and email stuff, maybe watch some videos and such, a single core or dual core is plenty, those aren’t very demanding tasks.

If you play the very most modern games and have a very powerful video card, you really need a lot of cores and a high clock speed to get the most out of your card and games.

If you do a lot of photo editing or video editing/encoding, number of cores/threads is the most important thing by a fair margin.

 

 

Lastly…

I hope that this has been a useful article for you to read, if you have questions about it please post a comment or even better register on the FunkyKit forums and make a post with the questions, I and the rest of the staff and users will be more then happy to talk to you about this article and/or what cpu fits your needs best.

–Bobnova

 

Related Products:

 

Related posts

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More