How do I determine if my x86-compatible Intel system is multi-processor, multi-core or supports hyperthreading?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 4.2 and later
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6

Issue

  • How do I determine if my x86-compatible Intel system is multi-processor, multi-core or supports hyperthreading?

Resolution

Hyperthreading (HT), also known as Symmetric Multi-Threading (SMT), is only a feature of Intel CPUs. It first appeared in Xeon server processors in 2002 and made its way to desktop Pentium 4 processors shortly thereafter. It was absent on all Core microarchitecture processors (Core2Duo, Core2Quad, etc.), but hyperthreading has been a feature on most models of Intel processors since the introduction of the Nehalem microarchitecture (Core i5, Core i7, etc.) in 2008.

To determine whether a system is multi-processor, multi-core, has hyperthreading or supports a combination of the three, look at the physical id, siblings, core id and cpu cores values in /proc/cpuinfo on Red Hat Enterprise Linux 4 or on Red Hat Enterprise Linux 5 while running a non-Xen kernel. A non-Xen kernel is required for Red Hat Enterprise Linux 5 as Xen does not differentiate between multi-core, multi-processor or hyperthreading processors. Each "processor", regardless of type, is treated as a unique, single-core processor under Xen.

  • The physical id value is a number assigned to each processor socket. The number of unique physical id values on a system tells you the number of CPU sockets that are in use. All logical processors (cores or hyperthreaded images) contained within the same physical processor will share the same physical id value.

  • The siblings value tells you how many logical processors are provided by each physical processor.

  • The core id values are numbers assigned to each physical processor core. Systems with hyperthreading will see duplications in this value as each hyperthreaded image is part of a physical core. Under Red Hat Enterprise Linux 5, these numbers are an index within a particular CPU socket so duplications will also occur in multi-socket systems. Under Red Hat Enterprise Linux 4, which uses APIC IDs to assign core id values, these numbers are not reused between sockets so any duplications seen will be due solely to hyperthreading.

  • The cpu cores value tells you how many physical cores are provided by each physical processor.

Note:

If the siblings and cpu cores values match, the processors do not support hyperthreading (or hyperthreading is turned off in the BIOS).

If siblings is twice the value of cpu cores, the processors support hyperthreading and it is in use by the system. Duplication of the core id values is also indicative of hyperthreading.

It is worth noting that the presence of the "ht" flag in the cpuflags section of /proc/cpuinfo does not necessarily indicate that HyperThreading(HT) is enabled on a system or has hyperthreading capabilities. That flag indicates that the processor is capable of reporting the number of siblings it has, not that it specifically has the hyperthreading feature.

Below are some examples of /proc/cpuinfo output taken from a Red Hat Enterpise Linux 5 system. The last example includes a comparison between the output of Red Hat Enterprise Linux 4 and 5 on the same system:

Single-processor, Single-core, HT

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

The cpu cores value is "1", so this system uses single-core processors. The cpu cores value does not match the siblings value, so this system has hyperthreading. There is one physical id listed, so this is a single-processor, single-core system with hyperthreading.

Single-processor, Dual-core, non-HT

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

The cpu cores value is "2" so the system uses dual-core processors. The cpu cores value matches the siblings value, so this system does not have hyperthreading. There is one physical id listed, so this is a single-processor, dual-core system without hyperthreading.

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

The cpu cores value is "1" so the system uses single-core processors. The cpu cores value does not match the siblings value, so this system has hyperthreading. There are two physical IDs listed, so this is a dual-processor, single-core system with hyperthreading.

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

The cpu cores value is "2" so this system uses dual-core processors. The cpu cores value does not match the siblings value, so this system has hyperthreading. There are two physical IDs listed, so this is a dual-processor, dual-core machine with hyperthreading.

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

The cpu cores value is "4", so the system uses quad-core processors. The cpu cores value matches the siblings value, so this system does not have hyperthreading. There is one physical ID listed, so this is a single-processor, quad-core system without hyperthreading.

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

The cpu cores value is "4", so the system uses quad-core processors. The cpu cores value matches the siblings value, so this system does not have hyperthreading. There are two physical IDs listed, so this is a dual-processor, quad-core system without hyperthreading.

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

The cpu cores value is "4", so the system uses quad-core processors. The cpu cores value does not match the siblings value, so this system has hyperthreading. There are two physical IDs listed, so this is a dual-processor, quad-core system with hyperthreading.

To illustrate the difference in the output on Red Hat Enterprise Linux 5 and 4, here are the values for the same dual-processor, quad-core system with HT under Red Hat Enterprise Linux 4:

processor       0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 
physical id     0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  
siblings        8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  8  
core id         0  8  1  9  2 10  3 11  0  8  1  9  2 10  3 11
cpu cores       4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4

Even though the output is different, the same rules work on Red Hat Enterprise Linux 4. You can tell that this system has four CPU cores per processor from the cpu cores value, hyperthreading support is indicated by the mismatch between siblings and cpu cores, and the two physical id values show that this is a dual-processor system.

Quad-processor, 6-core, no HT

processor       0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
physical id     0 0 0 1 1 1 2 2 2 3  3  3  0  0  0  1  1  1  2  2  2  3  3  3 
siblings        6 6 6 6 6 6 6 6 6 6  6  6  6  6  6  6  6  6  6  6  6  6  6  6
core id         0 2 4 0 2 4 0 2 4 0  2  4  1  3  5  1  3  5  1  3  5  1  3  5
cpu cores       6 6 6 6 6 6 6 6 6 6  6  6  6  6  6  6  6  6  6  6  6  6  6  6

The cpu cores value is "6", so the system uses 6-core processors. The cpu cores value matches the siblings value, so this system does not have hyperthreading. There are four physical IDs listed, so this is a quad-processor, 6-core system without hyperthreading.

SBR
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.