9

I have a laptop with Intel i5 M430 2.27GHz. The CPU has TWO REAL cores but it also has some kind of virtualization so Windows sees it as 4-core.

In a REAL dual core CPU, a single threaded program will run in a single core at 2.27GHz. Right?

My question is, in my 4-core CPU, the same program runs at a speed of 1.13 GHz? (2.27 / 2) I mean, the frequency of each real core is split in two in order to simulate a 4-core CPU?

I need to know for to run a CPU-hungry program at maximum speed. If I run two instances of that program I will finish my data processing two times faster, because I have two real cores. But if I start 4 instances I will finish the processing 4 times faster or is this '2 extra virtual cores' thingy another eye-candy feature from Intel?


Update:

I used CPU Overload to start 2 and 3 very CPU intensive threads. In Resource Monitor the "CPU-Total" graph shows only 50 and respectively 75% utilization.

Hennes
  • 64,768
  • 7
  • 111
  • 168
Gabriel
  • 2,059
  • 7
  • 32
  • 49

2 Answers2

22

You have a CPU with hyperthreading technology. You can't change this, but don't worry, you won't have any performance loss; actually it increases your system's performance.

Note that the CPU clock is not equal to CPU performance. The clock is not divided by two for two threads.

Update/conclusion: As already mentioned in the comments, in some (most?) BIOSs it is possible to turn off the hyperthreading. But that will not bring any performance enhancements, due Intels thread management is intelligent enough to use only as much as needed.

Michael K
  • 3,428
  • 4
  • 25
  • 44
  • 12
    you can turn off hyperthreading in the bios, if you need to. However, hyperthreading does have a performance advantage in most situations. – Journeyman Geek May 18 '11 at 10:20
  • 2
    According to Intel, the performance is increased up to 30% by hyperthreading. I did not know that you can actually turn it off, most BIOS does not seem to have this option. – Michael K May 18 '11 at 10:22
  • a lot of bioses are crippled i suppose, it SHOULD be possible on most decent ones ;p – Journeyman Geek May 18 '11 at 10:22
  • "Also the CPU clock is not equal to CPU performance" - - - I know that. – Gabriel May 18 '11 at 11:59
  • "actually it increases your systems performance" - - - I also know that. But I am interested maximum performance for one single/specific program. – Gabriel May 18 '11 at 12:01
  • "The clock is not divided by two for two threads" - - - then those extra 2 cores are 100% useless. From where did you get CPU cycles to power them? Example: if you start two programs in the real cores, and then another 2 programs in the virtual cores, the programs in the virtual cores will starve. – Gabriel May 18 '11 at 12:04
  • Please have a look at the article linked in my text, you wont have more performance in any way by disabling HT. – Michael K May 18 '11 at 12:04
  • the core has a partial pipeline to handle them - part of a core as opposed to a full core – Journeyman Geek May 18 '11 at 12:15
  • That Wikipedia page does not explain how it affects a single program or how the CPU cycles are distributed among 4 independent programs each using 100% CPU. – Gabriel May 18 '11 at 12:16
  • To get back down to your question, there may be a switch in you bios for the HT. If you don't find one there, I assume there is no way to turn it off. – Michael K May 18 '11 at 12:18
  • 4
    HT was extremely useful with single-core CPUs, but multi-core CPUs find it less useful due to the presence of the other cores. Also, you *may* get better performance from a *single* app if HT is disabled since each real core will have more resources available; the only way to be certain is with empirical testing. – Ignacio Vazquez-Abrams May 18 '11 at 12:20
  • 1
    HT has come a long way since it's first implementation in the Pentium 4 CPUs. There are very few scenarios where it will harm performance. – afrazier May 18 '11 at 13:19
  • thanks Ignacio. I hope I could find a web site where this test was already performed. – Gabriel May 18 '11 at 13:57
  • 2
    HT does not halve the CPU cycles devoted to any given thread because it is a technology that allows the physical CPU core to handle more than one thread per cycle. Using some sort of intelligence that determines what part of the core is going to be used by any given thread, HT will run 2 threads in a single cycle on a single core without one interfering with another. – music2myear May 18 '11 at 16:26
  • 4
    @Altar As a side note, when the CPU is not being used hard enough to require the use of the potential extra resource that hyperthreading provides then Windows 7 will "park" that hyperthreaded core, presumably freeing up all the resources to allow the real cores to work efficiently. I can see this happening on my quad core i7 in the Resource Monitor program as cores #1, #3, #4 and #7 are "Parked" and showing 0% CPU usage while cores #0, #2, #5 and #6 are running. – Mokubai May 18 '11 at 17:19
  • Thanks music2myear. Finally a good TECHNICAL explanation. Can you point to more documentation about it? Thanks Mokubai - You are right. Two of my cores are also parked, even if the ResMon shows some (below 10%) activity in them. – Gabriel May 20 '11 at 09:30
  • All those information and the the documentation you want can be found in the wikipedia article I have linked. – Michael K May 20 '11 at 09:43
  • http://software.intel.com/en-us/articles/intel-hyper-threading-technology-your-questions-answered/?wapkw=(hyper+threading+technologies) this is the Intel statement about hyperthreading. You can find more references by having a look at the reference chapter of the wikipedia article. – Michael K May 20 '11 at 09:46
  • Unfortunately this answer has aged badly. Hyperthreading has aggravated the Spectre vulnerabilities and it's recommended to turn it off in some cases. – Joshua Aug 08 '22 at 21:17
3

Hyper Threading (HT) by Intel is designed to allow two threads to run on a single core at the same time. Thus, since you have a dual core CPU with HT, you can run four threads at once. Generally, the clock speed of the CPU is fixed and does not vary based on how many threads are running at the same time. However, Intel recently introduced a function called Turbo Boost which allows the CPU to run at a higher clock speed if not all the cores are being used. Your CPU has Turbo Boost built in so it will run at 2.26 Ghz if both cores are heavily used and 2.53 Ghz if only one core is heavily used. This is all handled automatically and the difference in clock speed is only about 10% so don't worry too much about it. You will be better off making sure that everything else is shutdown freeing up resources for your main process.

Andy
  • 31
  • 1
  • I used 'CPU Overload' to start 1 very CPU intensive thread. In Resource Monitor the graph (the blue line that represents Maximum Freq.) does not jump to 110%. – Gabriel May 20 '11 at 09:43