18

Some bios's Do Not have the option to disable Hyperthreading of the CPU, it there a way to disable it in the Windows 7 Registry? Or a tool or software?

I know about msconfig boot tab (advanced options) and disabling processors there, not sure if it disables complete cores or hyperthreads, or how to tell.

32bit or 64bit Windows 7

EDIT:

Lets assume it is a dual core or more with hyperthreading.

In Device manager it shows 4 processors on my i5 Intel Processor, and you cannot disable them either, dang.

ᔕᖺᘎᕊ
  • 6,173
  • 4
  • 33
  • 45
Moab
  • 58,044
  • 21
  • 113
  • 176
  • 5
    I am thinking this is the impossible question of the month. – Moab Jul 04 '11 at 00:54
  • You really can't disable it in the BIOS? Is it the latest version? – KCotreau Jul 04 '11 at 01:00
  • 2
    Its a HP PC, well known for crippled bios's no matter the version. – Moab Jul 04 '11 at 01:06
  • 1
    Not all i5 Chips are created equal, some have 4 physical cores and Hyper-threading disabled, while some have 2 cores and Hyper-threading enabled - usually notebbooks use Hyper-threading and Desktop chips are more likely to be a quad-core variant. Are you using a Desktop or Notebook and do you know the i5 model? – Dustin G. Jul 04 '11 at 01:25
  • I wouldn't worry too much about Hyperthreading. It has seen big improvements since the P4. It doesn't suck up performance nowadays. – surfasb Jul 04 '11 at 05:03
  • @Dustin G, its not particular to a processor, i5 was an example, evidently a poor one, the main question remains, a non bios method to disable hyperthreading on any Intel processor. – Moab Jul 04 '11 at 13:38

3 Answers3

3

From the Intel Core Processor Datasheet, Volume 1, page 38:

Intel Hyper-Threading Technology

[...] This feature must be enabled using the BIOS and requires operating system support.

This is because hyperthreading is actual physical hardware on the CPU die, and thus can be enabled/disabled on a hardware level only.

If you know which application does not work well with hyperthreading, you can use a tool like StartAffinity if you have XP.

If you use Windows 7, there is a built in start command that can do this. Use the following command to launch a process with a particular processor affinity (again, the /AFFINITY argument was only added in Windows 7):

start /AFFINITY <mask> "C:\yourprogram.exe" 

Where <mask> should be replaced with the hexadecimal mask for the processors you want to run (the processor mask is just a binary mask enabling/disabling that affinity, so 00000101 enables CPU0 and CPU2, and 00000010 enables only CPU1).

To calculate the hex value, you can either convert the binary mask, or take the sum of 2 to the power of the cores you want to run the program on (starting from 0), and convert that value to hexadecimal.

For example, if I have a four-core system, and only want the process to execute on CPU0 and CPU2, I would add 20 + 22 = 1 + 4 = 5. Convert 5 to hex, which is just 5, and set that as your <mask>. You could also just convert 00000101 to hex as well. If you don't know how to convert these bases, you can just use this conversion table.

Breakthrough
  • 34,227
  • 10
  • 105
  • 149
  • I understand affinity, but this will not disable a hyperthread, only a complete core. I don't think it is possible inside the OS to disaable Only hyperthreading, only in the bios, but some bios's do not have that option, mostly on HP pc's, I was hoping someone could prove me wrong. – Moab Aug 04 '11 at 15:45
  • 1
    Each physical core shows up in the OS as two logical ones. If you disable one of those *logical* cores, you effectively disable hyperthreading, since instructions are only sent to *one* of the two logical cores, so no hyperthreading is actually done - the instruction queue is directly sent to the physical core. – Breakthrough Aug 04 '11 at 16:36
  • I get it, but it only disables hyperthreading for that one core. I need both disabled. – Moab Aug 04 '11 at 16:53
  • 1
    @Moab Then you just enable all even or odd numbered cores to disable every other one, using the masks I listed above. So if you have four logical cores, use 00000101, or 5 in hex, as your hexmask to set only CPU0 and CPU2 as enabled. If you have 8 logical cores, your bitmask would be 01010101, or 55 in hex (to enable only CPU0, 2, 4, and 6). – Breakthrough Aug 04 '11 at 17:04
  • How do I know which ones are the hyperthreading ones, odd? Thanks for your patience. – Moab Aug 04 '11 at 20:26
  • 2
    @Moab it doesn't technically matter, so long as you disable every other core. Every set of two logical cores make up the thread handlers for a single physical core. – Breakthrough Aug 04 '11 at 21:26
  • Now I need to brush up on my math, thanks so much. – Moab Aug 04 '11 at 22:45
  • I don't think there is a registry hack, but I will give you the accepted answer. – Moab Aug 04 '11 at 22:47
2

Disabling Hyper-threading is a BIOS-only affair.

I am assuming that you would like to disable Hyper-Threading because you have an application that is not optimized for this feature and may have reduced performance?

When looking at CPU numbering, the physical cores are odd numbered - so in a dual-core, HT system, cores 1 and 3 would be the "real" CPU's. If you select 2 cores in msconfig, CPU's 1 and 2 would be enabled so you would have a Physical and Logical (HT) CPU active - this would not benefit you if you are having issues with software that has issues with HT.

Dustin G.
  • 2,055
  • 11
  • 8
0

In Windows, a most easy way is to change the affinity of explorer.exe since every process launched from that will inherit the affinity mask. It's still far from perfect but at least you do this only once per session.

E. Attia
  • 19
  • 1
  • I'm not sure this answers the question, as process affinity isn't the same thing as Hyperthreading. – Doktoro Reichard May 01 '14 at 17:29
  • Fortunately, things are not based on what you are sure or not but how they are specified in MSDN (for instance) http://msdn.microsoft.com/en-us/library/windows/desktop/ms683194%28v=vs.85%29.aspx GetLogicalProcessorInformation gives the process affinities maching physical / logical processors (this is an exact way). On hyperthreading systems with 2-logical cores SMT (such as hyperthreading) Core #0 is bit 0 and 1, Core #1 bit 2 and 3 of the affinity mask etc... (this is an empirical way). I would be grateful if you could avoid downvoting things you have only intuitions on ... – E. Attia Jun 02 '14 at 12:14