From: Andrew Marlow <andrew.marlow@uk...> - 2010-12-21 13:59:34
How do I use sigar to get the number of hyperthreading CPUs please? The machine I am using has a quad core intel xeon E5440.
sigar identifies 3 physical CPUs but says that each one has 1 socket with 4 CPUs in it, which means a total of 16 logical CPUs. Is that right? Is that the right way to tot up the number of logical CPUs?
From: Andrew Marlow <andrew.marlow@uk...> - 2010-12-23 12:08:05
Thanks for your reply, but I think that SIGAR is wrong. Let me explain....
Also when I said '3' it was a slip of the finger. I meant '4'. For each of the 4 CPUs SIGAR does indeed say there are 4 virtual CPUs, making 16 virtual CPUs in all. But this figure is wrong. The Intel Xeon E5440 does not have any hyper-threading capability, despite the Intel spec saying that it does. The spec is wrong. The lack of hyperthreading is confirmed via several other facts:
1. There is no way to enable it in the BIOS and the BOIS screen says there is no hyperthreading
2. The coreinfo command of psools (aka sysInternals) shows no hyperthreading.
3. The unuspported WIN32 functions for calculating the number of hyperthreads returns 4, i.e the same as the number of physical CPUs.
So I reckon that 4 is correct and is 16 is wrong.I think SIGAR needs to call GetLogicalProcessorInformation on WIN32 and count the number of set bits in the processor mask for each physical CPU.