Wednesday, December 28, 2011

CPU_COUNT

According to Oracle’s own documentation for 10g release 1:
 
On most platforms, Oracle automatically sets the value of CPU_COUNT to the number of CPUs available to your Oracle instance. Do not change the value of CPU_COUNT.
 
The following test was done on an Oracle 9 database running on Tru64:
 
Tru64 > psrinfo -n
number of processors on system = 1
Tru64 > psrinfo -v
Status of processor 0 as of: 12/02/11 15:19:04
  Processor has been on-line since 02/19/2011 17:29:11
  The alpha EV6.7 (21264A) processor operates at 618 MHz,
  has a cache size of 2097152 bytes,
  and has an alpha internal floating point processor.
 
Tru64 > sqlplus '/ as sysdba'
 
SQL*Plus: Release 9.2.0.5.0 - Production on Fri Dec 2 15:19:28 2011
 
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
 
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
 
SQL> col value format a10
SQL> col isdefault format a9
SQL> select value, isdefault from v$parameter
  2  where name = 'cpu_count'
  3  /
 
VALUE      ISDEFAULT
---------- ---------
1          TRUE
 
SQL>
 
The following test was done on an Oracle 9 database running on Linux:
 
Linux > cat /proc/cpuinfo | grep -i 'processor' | wc -l
2
Linux > sqlplus '/ as sysdba'
 
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Dec 2 15:40:12 2011
 
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
 
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
 
SQL> col value format a10
SQL> col isdefault format a9
SQL> select value, isdefault from v$parameter
  2  where name = 'cpu_count'
  3  /
 
VALUE      ISDEFAULT
---------- ---------
2          TRUE
 
SQL>
 
The following test was done on an Oracle 10 database running on Solaris:
 
Solaris > psrinfo -p -v
The physical processor has 2 virtual processors (0 16)
  UltraSPARC-IV+ (portid 0 impl 0x19 ver 0x22 clock 1500 MHz)
The physical processor has 2 virtual processors (2 18)
  UltraSPARC-IV+ (portid 2 impl 0x19 ver 0x22 clock 1500 MHz)
Solaris > sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.3.0 - Production on Fri Dec 2 15:52:40 2011
 
Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
 
SQL> col isdefault format a9
SQL> col value format a5
SQL> select value, isdefault from v$parameter
  2  where name = 'cpu_count'
  3  /
 
VALUE ISDEFAULT
----- ---------
4     TRUE
 
SQL>
 
So it looks as if it works as intended. I went to an Oracle seminar recently, where they said that cpu_count works differently in 11g release 2. Once I have investigated, I will cover this in a future post.

No comments:

Post a Comment