Knowledge

Determine x86-compatible Intel system is multi-processor, multi-core or supports hyperthreading

Many people know Hyperthreading (HT), also called Symmetric Multi-Threading (SMT), a feature of Intel x86 CPUs found in older Pentium 4 and some Xeon processors. CPUs codenamed “Nehalem” also have Hyperthreading. Current CPUs based on the Core microarchitecture, such as Core2Duo and Core2Quad, do not have HT. How can we tell whether our system is multiprocessor or multicore, and whether it has Hyperthreading?

In Linux, identifying the CPU type is straightforward: inspect /proc/cpuinfo. However, do not use a Xen kernel when running the command, because kernel-xen does not display the actual CPU details and shows a single-core processor instead.

#cat /proc/cpuinfo

The examples below show how to interpret the information for different CPU types.

**Relevant fields:

“physical id” identifies the processor socket and lets you count processors.

“siblings” is the number of logical processors (the values are the same).

“cpu cores” is the number of physical cores in each physical processor.

Single-processor, Single-core, HT

processor	    0 1
physical id	0 0
siblings	    2 2
core id 	    0 0
cpu cores	    1 1  

In this example, physical id is only 0, indicating a single processor. siblings is 2, indicating two logical processors, and cpu cores is 1, indicating one core. This is HT because siblings divided by cpu cores equals 2—twice the physical processor count.

Single-processor, Dual-core, non-HT

processor	    0 1
physical id	0 0
siblings	    2 2
core id 	    0 1
cpu cores	    2 2   

In this example, physical id is only 0, indicating a single processor. siblings is 2, indicating two logical processors, and cpu cores is 2, indicating two cores. This is non-HT because siblings divided by cpu cores equals 1.

Dual-processor, Single-core, HT

processor	0 1 2 3
physical id	0 3 0 3
siblings	2 2 2 2
core id 	0 3 0 3
cpu cores	1 1 1 1  

In this example, physical id has values 0 and 3, indicating dual processors. siblings is 2, indicating two logical processors, and cpu cores is 1, indicating one core. This is HT because siblings divided by cpu cores equals 2.

Practice interpreting the other examples below to become familiar with identifying your CPU type.

Dual-processor, Dual-core, HT

processor	0 1 2 3 4 5 6 7
physical id	0 0 0 0 1 1 1 1
siblings	4 4 4 4 4 4 4 4
core id 	0 0 1 1 0 0 1 1
cpu cores	2 2 2 2 2 2 2 2    

Single-processor, Quad-core, non-HT

processor	0 1 2 3
physical id	0 0 0 0
siblings	4 4 4 4
core id 	0 2 1 3
cpu cores	4 4 4 4  

Dual-processor, Quad-core, non-HT

processor	0 1 2 3 4 5 6 7
physical id	0 1 0 1 0 1 0 1
siblings	4 4 4 4 4 4 4 4
core id 	0 0 1 1 2 2 3 3
cpu cores	4 4 4 4 4 4 4 4  

Dual-processor, Quad-core, HT

processor	0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
physical id	0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1
siblings	8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8
core id		0  0  1  1  2  2  3  3  0  0  1  1  2  2  3  3
cpu cores	4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  
EOF.← Back to articles