Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have the feeling that hyperthreading is not activated on my pc. I took a look into /proc/cpuinfo and there is described that siblings has the same number than cpu cores. This means that hyperthreading is not activated. How can i activate it?

Part entries of /proc/cpuinfo:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 23
model name  : Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
stepping    : 6
cpu MHz     : 2997.000
cache size  : 6144 KB
physical id : 0
siblings    : 2
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 10
wp      : yes
share|improve this question

4 Answers 4

/sys/bus/cpu/devices/cpu*/topology/thread_siblings_list shows the layout of cores and hyperthreads. To make it easier to visualise, I recommend using the lstopo command, install with:

sudo apt-get install hwloc

and run with:

lstopo

My ivybridge desktop has 4 CPUs; each has a hyperthread, so we get a diagram with Cores P#0..3 and each has two PU's (one of these being the hyperthread):

enter image description here

If you want just a text version of this output, use:

lstopo -
share|improve this answer
    
Not sure why no one has upvoted this yet... This is a really nice utility. –  Huck Bennett Nov 5 '12 at 1:22
    
this is super cool. you see the total cache, cores, hyperthreads all in 1 image –  Silver Moon Jul 3 at 4:38

in the result of dmidecode, you can get something like

    Core Count: 6
    Core Enabled: 6
    Thread Count: 12

on servers with hyper thread set to ON

or

    Core Count: 6
    Core Enabled: 6
    Thread Count: 6

on those set to OFF

share|improve this answer

Run top in a terminal, press number 1 in your keyboard to show load per cpu in the header, how many cpus are described there?

If they are the double of actual cores in your CPU hyperthreading is working as it should.

share|improve this answer

To detect if you are using hyperthreading (aka Intel Hyperthreading Technology) you can use dmidecode.

In a terminal:

sudo dmidecode > /tmp/dmidecode.txt
gksudo gedit /tmp/dmidecode.txt

Look for a Status value of Populated, Enabled (shown below between * ... *) i.e. "Enabled" means that hyperthreading is active

Physical CPU
Handle 0x000C, DMI type 4, 32 bytes
Processor Information
Socket Designation: Socket 1 CPU 1
Type: Central Processor
Family: Xeon
Manufacturer: GenuineIntel
ID: 43 0F 00 00 01 03 00 00
Signature: Type 0, Family 15, Model 4, Stepping 3
Flags:
FPU (Floating-point unit on-chip)
CX8 (CMPXCHG8 instruction supported)
APIC (On-chip APIC hardware supported)
Version: Intel Xeon
Voltage: 1.5 V
External Clock: 200 MHz
Max Speed: 4000 MHz
Current Speed: 3800 MHz
Status: *Populated, Enabled*
Upgrade: ZIF Socket
L1 Cache Handle: 0x0004
L2 Cache Handle: 0x0005
L3 Cache Handle: Not Provided

In a Hyperthreaded logical CPU you will see a Status value of unpopulated (shown below between * ... *):

Handle 0x000D, DMI type 4, 32 bytes
Processor Information
Socket Designation: Socket 2 CPU 2
Type: Unknown
Family: Unknown
Manufacturer: Not Specified
ID: 00 00 00 00 00 00 00 00
Version: Not Specified
Voltage: 1.5 V
External Clock: 200 MHz
Max Speed: 4000 MHz
Current Speed: 3800 MHz
Status: *Unpopulated*
Upgrade: ZIF Socket
L1 Cache Handle: 0x0006
L2 Cache Handle: 0x0007
L3 Cache Handle: Not Provided

source

share|improve this answer
    
The Linux kernel determines the number of CPUs and siblings from the CPU (using CPUID topology enumeration) rather than using the BIOS configured DMI data. I suspect that the DMI data is configured at boot time from the same CPUID data that the kernel uses, however, it is probably best to trust what the Linux kernel has determined rather than from DMI data. As it happens, in the majority of cases the BIOS probably gets it right. –  Colin Ian King Oct 17 '12 at 21:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.