Wrong count of CPU on HP-UX 11.31
We have two identical machines, two identical HW resources, two identical configurations but there is one significant difference. Output from machine A:
$ uname -srm
HP-UX B.11.31 ia64
SQL> select CPU_COUNT_CURRENT,CPU_CORE_COUNT_CURRENT,CPU_SOCKET_COUNT_CURRENT,CPU_COUNT_HIGHWATER from v$license;
CPU_COUNT_CURRENT CPU_CORE_COUNT_CURRENT CPU_SOCKET_COUNT_CURRENT CPU_COUNT_HIGHWATER
----------------- ---------------------- ------------------------ -------------------
28 28 28
$ machinfo
CPU info:
8 Intel(R) Itanium 2 9100 series processors (1.6 GHz, 24 MB)
533 MT/s bus, CPU version A1
28 logical processors
# ioscan -kf | grep processor | wc -l
28
So everything seems to be fine (just output from v$license shows misleading info) and we've got 28 cores. No, it's not! Output from machine B:
$ uname -srm
HP-UX B.11.31 ia64
SQL> select
CPU_COUNT_CURRENT,CPU_CORE_COUNT_CURRENT,CPU_SOCKET_COUNT_CURRENT,CPU_COUNT_HIGHWATER from v$license;
CPU_COUNT_CURRENT CPU_CORE_COUNT_CURRENT CPU_SOCKET_COUNT_CURRENT CPU_COUNT_HIGHWATER
----------------- ---------------------- ------------------------ -------------------
14 14 14
$ machinfo
CPU info:
8 Intel(R) Itanium 2 9100 series processors (1.6 GHz, 24 MB)
533 MT/s bus, CPU version A1
14 logical processors
# ioscan -kf | grep processor | wc -l
14
Machine A shows doubled amount of CPUs than on machine B. Both VPARs have 7x Intel Itanium 2 processors (2 cores each). So that means the vPar has 14 CPU cores. Machine B shows correct info but A doesn't. How to find correct information about CPUs in this case? We can use /sbin/vparstatus to clearly see that there are 14 cores assigned to vPar. Machine A:
[Virtual Partition Resource Summary]
CPU Num Num Memory Granularity
Virtual Partition Name Min/Max CPUs IO ILM CLM
============================== ======= ==== ==== ========== ==========
DB1 1/ 24 14 7 512 512
Machine B:
[Virtual Partition Resource Summary]
CPU Num Num Memory Granularity
Virtual Partition Name Min/Max CPUs IO ILM CLM
============================== ======= ==== ==== ========== ==========
DB2 1/ 24 14 6 512 512
It is very important to know correct information, at least in two cases, performance (monitoring, tuning or troubleshooting) and for correct product licensing. What is the difference between those two machines? The difference is that machine "B" has latest patches whilst machine "A" even it is patched but (according to swlist) certainly latest patches weren't used. Unfortunately I can't provide wich patch or bundle is fixing this problem for this moment but when I find it then I'll post it right here. Update: My theory was correct and the final answer is very simple - multithreading. This type of Itanium Processors have two threads for each core. You can set multithreading on partition level (this has been done on both of machines) and also on OS level by lcpu_attr and there was the difference. You can verify the settings using kctune |grep lcpu. So the conclusion is no matter what patches are installed in this case.