For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > Detecting Hyper Threading

Detecting Hyper Threading

Created by dave. Last edited by dave, 6 years and 349 days ago. Viewed 2,742 times. #6
[diff] [history] [edit] [rdf]
(10 May 2012)

(Note: Valid for RHEL family 4, 5, and 6. NOT valid for RHEL family 3.)

>>Dag explains:

Even though /proc/cpuinfo shows you all the logical CPUs (processor field) in the system, the siblings field holds the number of logical CPUs for the physical CPU this entry belongs to (including both the cores and the hyper-threaded LCPUs).

In other words, if you see: processor : 7 physical id : 9 siblings : 4 cpu cores : 2

It means that LCPU #7 (the eight logical CPU in your system) is one of the 4 logical CPUs on the physical CPU that has 2 cores. So yes, hyper-threading is enabled.

If the number of cpu cores is the same as the number of siblings, hyper-threading is disabled.


# egrep 'siblings|cpu cores' /proc/cpuinfo | sort | uniq
cpu cores       : 10
siblings        : 10
...hyperthreading disabled.


# egrep 'siblings|cpu cores' /proc/cpuinfo | sort | uniq
cpu cores       : 1
siblings        : 2
...hyperthreading enabled.
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt