Translation

The oldest posts, are written in Italian. If you are interested and you want read the post in English, please use Google Translator. You can find it on the right side. If the translation is wrong, please email me: I'll try to translate for you.

venerdì, febbraio 26, 2016

CPU count (ENG)

  • HP-UX (B.11.11)

[oracle]$/usr/sbin/ioscan  -knfC processor |grep processor |wc -l
      8
 
[oracle]$/usr/sbin/ioscan  -knfC processor

Class       I  H/W Path  Driver    S/W State H/W Type  Description
===================================================================
processor   0  4/10      processor CLAIMED   PROCESSOR Processor
processor   1  4/11      processor CLAIMED   PROCESSOR Processor
processor   2  4/12      processor CLAIMED   PROCESSOR Processor
processor   3  4/13      processor CLAIMED   PROCESSOR Processor
processor   4  6/10      processor CLAIMED   PROCESSOR Processor
processor   5  6/11      processor CLAIMED   PROCESSOR Processor
processor   6  6/12      processor CLAIMED   PROCESSOR Processor
processor   7  6/13      processor CLAIMED   PROCESSOR Processor



  • Solaris
[oracle]$/usr/sbin/psrinfo |wc -l
      32


[oracle]$/usr/sbin/psrinfo 
0       on-line   since 02/12/2016 09:57:19
1       on-line   since 02/12/2016 09:57:21
2       on-line   since 02/12/2016 09:57:21
3       on-line   since 02/12/2016 09:57:21
8       on-line   since 02/12/2016 09:57:21
9       on-line   since 02/12/2016 09:57:21
10      on-line   since 02/12/2016 09:57:21
11      on-line   since 02/12/2016 09:57:21
16      on-line   since 02/12/2016 09:57:21
17      on-line   since 02/12/2016 09:57:21
18      on-line   since 02/12/2016 09:57:21
19      on-line   since 02/12/2016 09:57:21
24      on-line   since 02/12/2016 09:57:21
25      on-line   since 02/12/2016 09:57:21
26      on-line   since 02/12/2016 09:57:21
27      on-line   since 02/12/2016 09:57:21
32      on-line   since 02/12/2016 09:57:21
33      on-line   since 02/12/2016 09:57:21
34      on-line   since 02/12/2016 09:57:21
35      on-line   since 02/12/2016 09:57:21
36      on-line   since 02/12/2016 09:57:21
37      on-line   since 02/12/2016 09:57:21
38      on-line   since 02/12/2016 09:57:21
39      on-line   since 02/12/2016 09:57:21
40      on-line   since 02/12/2016 09:57:21
41      on-line   since 02/12/2016 09:57:21
42      on-line   since 02/12/2016 09:57:21
43      on-line   since 02/12/2016 09:57:21
44      on-line   since 02/12/2016 09:57:21
45      on-line   since 02/12/2016 09:57:21
46      on-line   since 02/12/2016 09:57:21
47      on-line   since 02/12/2016 09:57:21



  • Linux 
[oracle]$cat /proc/cpuinfo|grep processor|wc -l
      16

[oracle]$/sbRdbms/oracle-$cat /proc/cpuinfo|grep processor
processor       : 0
processor       : 1
processor       : 2
processor       : 3
processor       : 4
processor       : 5
processor       : 6
processor       : 7
processor       : 8
processor       : 9
processor       : 10
processor       : 11
processor       : 12
processor       : 13
processor       : 14
processor       : 15



  • AIX (6.1 verified)
[oracle]$/bin/lparstat |head -2| sed '/^$/d'| awk '{print $6}'
lcpu=16

[oracle]$/bin/pmcycles -m
CPU 0 runs at 3864 MHz
CPU 1 runs at 3864 MHz
CPU 2 runs at 3864 MHz
CPU 3 runs at 3864 MHz
CPU 4 runs at 3864 MHz
CPU 5 runs at 3864 MHz
CPU 6 runs at 3864 MHz
CPU 7 runs at 3864 MHz
CPU 8 runs at 3864 MHz
CPU 9 runs at 3864 MHz
CPU 10 runs at 3864 MHz
CPU 11 runs at 3864 MHz
CPU 12 runs at 3864 MHz
CPU 13 runs at 3864 MHz
CPU 14 runs at 3864 MHz
CPU 15 runs at 3864 MHz


  • Update (15/Mar/2016)

From Oracle point of view, in order to obtains the CPU count, you have to query V$OSSTAT. This view exist from Oracle 10g onwards. Normally the value you use is NUM_CPUS

[Linux] select stat_name, value from  v$osstat where stat_name like '%CPU%';

STAT_NAME                           VALUE
------------------------------ ----------
NUM_CPUS                               16 <<< correct value
RSRC_MGR_CPU_WAIT_TIME                 43
NUM_CPU_CORES                          16
NUM_CPU_SOCKETS                        16


Anyway, on AIX platform, because the "Bug 14215038 : CPU_COUNT DOESN'T MATCH", you need to use different column

[AIX] select stat_name, value from  v$osstat where stat_name like '%CPU%';

STAT_NAME                           VALUE
------------------------------ ----------
NUM_CPUS                               44 <<< wrong value due to 14215038 Bug
OS_CPU_WAIT_TIME               3.3043E+10
RSRC_MGR_CPU_WAIT_TIME                  0
NUM_CPU_CORES                          10
NUM_VCPUS                              10 <<< correct Virtual CPU number
NUM_LCPUS                              20 <<< correct Logical CPU number


If you compare this output with the "AIX (6.1 verified)", you see that the NUM_CPUS column cointain a wrong value.


  • Update 2016/Jun/13

Modified the /usr/sbin/ioscan output. It counted wrong the CPU processors number
  • Reference
Physical - Virtual - Logical CPU

Nessun commento: