Sunday, August 29, 2010

Check Hyper Threading - Linux

When you need to know whether hyper-threading is enabled without rebooting your system (and checking BIOS/UEFI), you can simply look at the output of /proc/cpuinfo and compare the siblings with the cpu cores fields.
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).

For example, if you see:
processor : 7
physical id : 9
siblings : 4
cpu cores : 2

That 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 - hyper-threading is enabled.

1 comment:

Sasha said...

Like it! Great!!!