Is there a significant performance difference between virtual and real cores?

5

2

Possible Duplicate:
Hyper-Threading and Dual-Core, What's the Difference?

Most Intel processors feature what they call "hyperthreading," basically another virtual core for each physical core.

Is there a significant difference between these virtual cores and physical cores? For example, if I bought an 8-core machine and a hyperthreaded quad-core both at the same clock with similar specifications, would the 8 physical core machine outperform the quad-core-with-hyperthreading machine?

Naftuli Kay

Posted 2011-11-17T02:17:34.037

Reputation: 8 389

Question was closed 2011-11-17T04:32:08.743

possible duplicate of Hyper-Threading and Dual-Core, What's the Difference? also see: What is hyper-threading and how does it work?

– Ƭᴇcʜιᴇ007 – 2011-11-17T03:53:40.293

Answers

8

Yes, there is a difference.

Obviously, physical cores would only outperform the virtual cores if programs actually use them. :)

Virtual cores simply take advantage of CPU stalls to process another thread, while the CPU is waiting. When nothing is stalling, though, they don't run more instructions at a time than a single core.

Physical cores, on the other hand, actually run multiple threads in parallel; they are very similar to multiple physical processors, except that caches and such components might be shared at some levels.

user541686

Posted 2011-11-17T02:17:34.037

Reputation: 21 330

Note that this answer is talking about a version of hyperthreading that has very little to do with the kind of hyperthreading modern CPUs have. – David Schwartz – 2016-04-10T21:57:27.110

@DavidSchwartz: Not sure what you mean, elaborate? – user541686 – 2016-04-10T22:28:43.503

2This answer was applicable to the ancient form of hyperthreading available on the Pentium 4 but is totally inapplicable to modern hyperthreading which has nothing to do with taking advantage of CPU stalls and does run more instructions at a time even if nothing stalls. For example, if one thread is doing only integer operations, the other thread can use all the floating point units all the time. – David Schwartz – 2016-04-10T22:36:43.780

@DavidSchwartz: You're right that I was indeed referring to Pentium 4 HT when I wrote it, but I'm not sure I agree that the definition has really changed. Are you sure you're talking about "hyperthreading" and not a different term like a "superscalar" CPU or "simultaneous multi-threading"? If you really mean hyperthreading is different now, can you provide me a link that explains the details of what you're trying to say? – user541686 – 2016-04-10T22:38:44.760

I'm talking about modern hyperthreading. Each thread has equal access to the resources on the core and they can both run at full speed so long as they don't exhaust the supply of execution units at any particular time. Of course, if they both try to use all the floating point multipliers, then one will have to wait for the other. – David Schwartz – 2016-04-10T22:40:01.937

@DavidSchwartz: I wasn't aware that's called hyper-threading? I thought it fell under SMT and superscalar processing but I thought HT only referred to what I wrote... I guess not? – user541686 – 2016-04-10T22:44:09.983

Intel calls any scheme that runs more than one thread at a time in the same physical core "hyperthreading". – David Schwartz – 2016-04-10T22:47:08.597

@DavidSchwartz: Huh, okay, thanks for clarifying. – user541686 – 2016-04-10T22:52:37.093

4

Well, the difference is so significant, you could end up with no performance difference between a dual core with hyperthreading and a regular dual core. Consider hyperthreading as a 'recycling' feature, it could use clocks that otherwise unusable due to memory access. But on simplistic process, it could give you no improvement at all.

Martheen Cahya Paulo

Posted 2011-11-17T02:17:34.037

Reputation: 1 347

+1, and I believe you meant to write "Well, the difference is so insignificant..."? – Randolf Richardson – 2011-11-17T03:40:07.573

I thought it was rhetoricly accurate to the way it was sold :-) – Psycogeek – 2011-11-17T05:55:24.597

Sorry, I mean the difference between a physical dual core with a hyperthreaded core – Martheen Cahya Paulo – 2011-11-18T05:48:54.193