Intel introduced Hyper-Threading Technology (HT) in its line of Xeon processors in 2002. HT Technology enables multiprocessor servers to act as if they had twice as many processors installed. Intel’s HT Technology allows a single processor to handle two independent sets of instructions at the same time. In essence, HT Technology converts a single physical processor into two virtual processors. Currently HT is present in other Intel CPUs besides the high level Xeons, like Pentium 4 (with 800MHz CPU bus speed) or Pentium 4 Extreme Edition and the dual-core Pentium Extreme Edition. For more details see Intel’s site: http://www.intel.com/products/ht/hyperthreading_more.htm
In order to make use of Hyper-Threading in Linux, you will need Hyper-Threading enabled in kernel. But how can you find out if your CPU supports HT? We can get the information from our running Linux system about its CPU by looking into /proc. For example, bellow you can see the output taken from a Xeon system:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Inside the flags section we are looking for a ”ht” flag. If it is present, this means that the system supports HT. Let’s look on another sample taken from a Pentium4 CPU (the un-needed infos were removed):
1 2 3
Again this system also supports HT. If you don’t see the HT flag, then your system doesn’t support HT. Obviously this will not be available on AMD processors as this is an Intel technology (this might not be true anymore with newer AMD CPUs). Here is an example from an AMD Opteon system:
1 2 3
If your CPU supports HT, then you can take advantage of this technology only if HT support is enabled in your running kernel. You can either install a kernel provided by your Linux distribution with HT support (one that has SMP inside its name for ex.) or you can compile your own kernel and include HT support.
Once you are running a HT enabled kernel your should normally see the virtual CPU as a regular extra CPU (you will see 2 CPUs on a single CPU system, 4 CPUs on a dual processor system, etc.). You can easily check this with:
If you still see only one CPU even after you have installed a HT enabled kernel, then you might want to check:
HT is not disabled in BIOS.
APCI is enabled in BIOS.