Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

yettimillan

macrumors regular
Original poster
May 28, 2009
185
0
Hi,

My friends MBP shows 8 cores when you go to activity monitor. Mine is C2D and shows 2 cores. So I'm puzzled as to why his 4 core MBP would show 8 cores...

Is this something to do with the turbo boost?
 
Hyper threading makes every core be able to work on two threads at the same time. The CPU is a virtual eight core because of this.
 
So does this give true power of 8 cores or 4 cores + a bit of extra umph.

applications have to be designed a certain way to take advantage of the 8 threads.normally it would just be 4 threads with most applications but some as exporting motion movies/imovie/final cut the 8 thread advantage comes in.Some apps may be single/dual threaded and thus this is where turbo boost has the advantage.really it's a win win scenario.
 
applications have to be designed a certain way to take advantage of the 8 threads.normally it would just be 4 threads with most applications but some as exporting motion movies/imovie/final cut the 8 thread advantage comes in.Some apps may be single/dual threaded and thus this is where turbo boost has the advantage.really it's a win win scenario.

The only downside to that fact is the extra heat it produces, naturally. It is really an amazing concept, however, and which is why I like these CPU's.
 
Why wouldn't they just make 8 cores instead? Or 1 core capable of 8 threads or 2 cores capable of 4 threads.

I just don't understand why'd it have to be 4cores x2 threads.
 
What kind of stupid question is this? Are you just trolling?


8 cores would be a F ton more expensive, 1 core with 8 threads would perform like dog poop. They put many, many millions into designing sandy bridge, they did everything for a reason, and a good reason at that.
 
applications have to be designed a certain way to take advantage of the 8 threads.normally it would just be 4 threads with most applications
No, this is not the case. A 4 core/8 threads hyperthreading-capable CPU appears 100% as a 8-core CPU from a software perspective. It's completely transparent (which is one of the big boons of hyperthreading I might add.)

Software CAN tell that some of the cores are merely virtual, however this is as an aid to help scheduling tasks evenly across all physical cores. You don't want two heavy-lifting work threads scheduled to the two threads of the same physical CPU, leaving another CPU core sitting entirely idle. That'd limit performance severely.

Ideally, you'd want heavy work threads paired with low-intensity threads to maximize CPU utilization...

Why wouldn't they just make 8 cores instead?
Adding hyperthreading to a CPU requires far less hardware than a full CPU core, somewhere on the order of 5% of the total CPU core area (not counting level 2 or 3 cache, I believe.)

Or 1 core capable of 8 threads or 2 cores capable of 4 threads.
Adding more threads to a physical CPU has rather steeply diminishing returns. The CPU's execution units can only execute instructions from one thread at a time (those aren't doubled-up), so for hyperthreading to have any effect it must have instructions from at least one thread already stored in its on-chip cache. The more threads competing for the same cache space increases the risk of cache thrashing (which happens when one or more threads repeatedly overwrites cache lines belonging to itself or other threads), which is very bad for performance.

I just don't understand why'd it have to be 4cores x2 threads.
This is a optimal design from a power (meaning wattage) and cost-effectiveness point of view at this point in time. In the future, more cores and/or threads will be feasible. :)
 
You're starting to get into CPU architecture and design. Some fun stuff. Here's a summary of how it all works and the history.

Basically, a CPU is single threaded and can only do 1 operation at a time. It can take a value from one register (a group of capacitors that represent data (charged capacitor = 1, discharged capacitor = 0)) and perform a basic calculation (and, or, xor, left shift, right shift, etc).

The number of operations it can do in a single second is the clock speed. A clock speed of 1GHZ is 1,000,000,000 operations per second.

Because it is so fast, and because humans see 1 second as a little bit of time, it creates the illusion that multiple things are happening at the same time. Sort of how motion pictures work.

Because there was 1 CPU on 1 physical chip, the terms were synonymous.

They discovered that CPUs were very good at lots of things, but were not very good with some mathematical operations. Calculations with long decimal places took many, many operations to perform. So they started adding an extra part to the chip for FPA (floating point arithmetic). It was very more efficient at working with decimal points. And since it was separate part, the CPU could give the FPA a calculation and then work on something else until the FPA was done and returned the result. If the CPU wasn't working with big decimal places (or similar problems), then the FPA was idle.

Eventually, engineers realized that it was kind of wasteful to have the FPA idle most of the time. So they built a chip where the CPU would call the FPA all the time, not just for special calculations. Intel called this hyper threading. It allowed a single chip to perform 2 operations at the same time (one by the CPU and one by the FPA).

More time goes by, more RD money spent, and they figured out how to put multiple CPU's (each with it's own FPA) on a single chip.

The activity monitor doesn't distinguish between a CPU and an FPA. Both are a processing core that is capable of performing an operation.

Now marketing and advertising can get a little confusing.

Sometimes a chip with 1 cpu and 1 fpa will be advertised as "Dual Core."
Sometimes a chip with 2 cpus and 2 fpa will be advertised as "Dual Core."

In the first case, you are capable of 2 operations at once.
But in the later case, you actually are capable of 4 operations at once.

All macs (except the Mac Pro) have a single processor (physical chip). They may have 4 cores (cpu) each is hyperthreaded. So it will look like there are 4 processors.

Some physical chips have 6 or 8 cores. Each is hyper threaded, so can do 12 or 16 operations at a time. If you had 2 physical chips, then you'd be capable of 24 or 36 operations at a time.
 
I am not an expert myself but I think you have a few mistakes or over simplifications in your post.

They discovered that CPUs were very good at lots of things, but were not very good with some mathematical operations. Calculations with long decimal places took many, many operations to perform. So they started adding an extra part to the chip for FPA (floating point arithmetic). It was very more efficient at working with decimal points. And since it was separate part, the CPU could give the FPA a calculation and then work on something else until the FPA was done and returned the result. If the CPU wasn't working with big decimal places (or similar problems), then the FPA was idle.

Eventually, engineers realized that it was kind of wasteful to have the FPA idle most of the time. So they built a chip where the CPU would call the FPA all the time, not just for special calculations. Intel called this hyper threading. It allowed a single chip to perform 2 operations at the same time (one by the CPU and one by the FPA).

From my understanding this is also possible without Hyper Threading, what you're describing is just pipelining and to an extent out-of-order execution. Also today most CPUs can execute more than one instruction with one clock, I think for current Intel CPUs it is between 4 and 8 instructions. That's called superscalar.

Hyper-Threading on the other hand has two logical cores for each CPU (including two instruction pipelines) this allows two threads to run at the same time, of course they still share the same execution resources. This is completely transparent for the OS, that just wouldn't be very efficent.

The activity monitor doesn't distinguish between a CPU and an FPA. Both are a processing core that is capable of performing an operation.

Not quite, what the Activity monitor shows are the logical cores, not parts of different execution units of a single core. I could have two threads using only integer arithmetic and still have all (logical) cores being used.
 
Only intel i series has hyper threading.
For dual cores, 2 physical cores 2 virtual cores.
For quad cores 4 physical cores 4 virtual cores.
 
Ok so for example,

A game which requires a quad core processor to run well....does this mean it needs to actually be a quad core processor.

Or will a dual core with hyper threading be enough? Does it work like that?


Also when I was looking at the utilisation of the 8 cores on my friends MBP only 4 were actually in use, he had quite a few programmes open, nothing really heavy but things like iTunes, Safari, finder...even when we were transferring about 50GB worth of backups from one HD to another there were still only 4 cores being utlilized.
 
Ok so for example,

A game which requires a quad core processor to run well....does this mean it needs to actually be a quad core processor.

Or will a dual core with hyper threading be enough? Does it work like that?

Nope, doesn't work like that. You will need 4 physical cores.

http://en.wikipedia.org/wiki/Hyper-threading

A read through of this should provide more than enough info of what hyperthreading does.
 
Ok so for example,

A game which requires a quad core processor to run well....does this mean it needs to actually be a quad core processor.

Or will a dual core with hyper threading be enough? Does it work like that?


Also when I was looking at the utilisation of the 8 cores on my friends MBP only 4 were actually in use, he had quite a few programmes open, nothing really heavy but things like iTunes, Safari, finder...even when we were transferring about 50GB worth of backups from one HD to another there were still only 4 cores being utlilized.

If you watch a CPU monitor while doing things, you'll realize that only half the cores in a hyperthreaded CPU are being used most of the time. that is because software specifically has to be made to use hyperthreaded computing in order to use all of the threads, instead of just the 2/4 original ones. One program that can do this is Handbrake.

(i might have gotten some of those terms wrong...)
 
Ok so for example,

A game which requires a quad core processor to run well....does this mean it needs to actually be a quad core processor.

Or will a dual core with hyper threading be enough? Does it work like that?


Also when I was looking at the utilisation of the 8 cores on my friends MBP only 4 were actually in use, he had quite a few programmes open, nothing really heavy but things like iTunes, Safari, finder...even when we were transferring about 50GB worth of backups from one HD to another there were still only 4 cores being utlilized.

It has to be designed a certain way to take advantage of the virtual threads
 
So if my C2D is 2.0Ghz and the lowest end MBA is 1.6Ghz does that mean my one is slightly faster??

Im really confused..
 
No, since newer CPU generations tend to be able to accomplish more per cycle, too. Adding the advantages of hyper-threading, the 1.6GHz i5 is probably a bit faster than your C2D 2.0.

You could always have a look into the Geekbench database for a rough estimate.
 
No, since newer CPU generations tend to be able to accomplish more per cycle, too. Adding the advantages of hyper-threading, the 1.6GHz i5 is probably a bit faster than your C2D 2.0.

You could always have a look into the Geekbench database for a rough estimate.

Exactly. This is why Intel decided to try to hide clock speed when describing the processors. The different architecture in Sandy Bridge (the processors in the new Macbook Pros and Airs) makes the CPU significantly faster than a Core 2 Duo system at the same clock speed. Hyperthreading has a little to do with it but it's really just that the Core i series is significantly more efficient than the Core 2 Duo series.
 
I guess you are making this more complicated that it needs to be.

All you need to understand is what is a thread and what is a CPU Core.

A Thread is smallest single unit of a program. You cannot cut it or slice it. It is a list of instructions that need to be executed in sequential order. It is like a cooking recipe.

A CPU has many parts responsible for different things and can usually only handle one thread per core. It is like a kitchen full of cooks. One responsible for deserts and one for main dish, one for sauces ... But they can only do one thing at a time.

Now you throw two recipes in that kitchen that both only contain deserts. It won't come out finished any faster than throwing them in one after an other. If one is a desert with a main dish than it will finish sooner if you don't wait for one to complete to send in the next recipe.

Now in real CPU life it throwing 2 threads at one Core results in up to 25% more performance. Sometimes none (like gaming usually). Expressed differently 25% more per core means a 2 threaded Core is like 2 times a slower core than is only 60% as fast as 1 core that has to deal with only 1 thread.


GPUs like Nvidias 500M series have schedulers which can handle thousands of threads to feed a couple hundred cores. Thus you can make it handle more threads but for a CPU more than 2 doesn't do any good for a massively parallel GPU it seems to be better.
The design is quite different thouch because it is usually one scheduler that feeds a couple cores like 16 and juggles like 4 times the number of threads than cores.


A cook that has 2 or 4 different recipes hanging in front of him won't finish any faster if he has only one frying pan. Hyperthreading gives a couple of extra % speed and a little more than the extra power it consumes, which is why Intel uses it but it really isn't much.
AMDs Bulldozer is different. They actually double the most used parts (which are conveniently the smaller ones) on the CPU and get like 80% more speed. They talk call their 8 core CPUs 8 core though not Quad anymore although it gets really blurry here as to when you start calling it octa (8) instead of quad. With hyperthreading ther is no confusion a Quad is a Quad and nothing more.
 
Threads, cores, and backplane speed?

While I understand that multiple cores with hyperthreading makes the execution of instruction streams faster, isn't the actual limit in many cases the speed with which data ( and instructions ) can be fetched from memory? I don't know if the macbook pro has a single path to memory or not. It would make a difference if it did.

I have done much work on the old Cray's and other supercomputers and they had 8 way interleaved memory so that data could be being fetched simultaneously from 8 different locations. We wrote our codes so that the "stride factor" was 8 and we would write our loops so that we did the 1st, 8th, 15th, to the end of the array, then go back and do the 2nd, 9th, etc. This was much faster than stepping sequentially through the arrays. We did timing tests that showed this.

No matter how fast the CPU, a non-super computer without interleaved memory, can usually only latch one address on the memory bus, read that 64 bit's of data into a register, release the latch, and then another CPU, thread, core or whatever can repeat this operation. Thus, while it's good to have multiple CPU's, cores, thread's, etc. so that one is always waiting to get its data, having a lot more cores or threads doesn't help much if you're always waiting on the data bus to be free.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.