Link to home
Start Free TrialLog in
Avatar of charding
charding

asked on

Oracle Processor Affinity and Usage

We have just migrated a database to a new server that has two dual-core CPUs. We are noticing that Oracle seems to max out at 25% of the total CPU power on the machine, even when it is running highly compute intensive processes that would max out the CPUs on our prior machine.  The new server is Windows 2008 64-bit and the old server was Windows 2003 64-bit.  Is there any setting in Oracle or the Operating System that would be limiting the CPU usage for Oracle?  It does run on all four CPUs (CPU affinity) but the total usage does not exceed 25%.  
Avatar of johnsone
johnsone
Flag of United States of America image

It could be the way the CPU usage is begin reported by the tool you are using.  25% or a 4 CPU machine is 100% of 1 CPU.
Avatar of charding
charding

ASKER

I am using Task Manager and realize that 25% of a 4 CPU machine kind of translates to 100% of 1 CPU; however, I am expecting to see Oracle using alot more of the available resources.  I would expect our CPU intensive PL/SQL to take it upto at least 50% (of 4 CPUs or completely using 2 CPUs) but that is not occurring.
A single thread process cannot use more than one processor.  You would need to have multiple processes running to see usage on more than one CPU.
One way is to use partitioned tables and to paralelize the processing.
Partitioned tables are used but this is not the typical case of usage.

An approach is to to invoke many Oracle background processes and and/or assign them to different
CPUs:


Affinity and Priority Settings

The Oracle database supports the modification of both priority and affinity settings
for the database process and individual threads in that process when running on
Windows.
By modifying the value of the ORACLE_PRIORITY registry setting, a database
administrator can assign different Windows priorities to the individual background
threads and also to the foreground threads as a whole. Likewise, the priority of the
entire Oracle process can also be modified. In certain circumstances, this may
improve performance slightly for some applications. For instance, if an application
generates a great deal of log file activity, the priority of the LGWR thread can be
increased to better handle the load put upon it. Likewise, if replication is heavily
used, those threads that refresh data to and from remote databases can have their
priority bumped up as well.
Much like the ORACLE_PRIORITY setting, the ORACLE_AFFINITY registry
setting allows a database administrator to assign the entire Oracle process or
individual threads in that process to particular CPUs or groups of CPUs in the
system. Again, in certain cases, this can help performance. For instance, pinning
DBW0 to a single CPU such that it does not migrate from one CPU to another can
in some cases provide a slight performance improvement. Also, if there are other
applications running on the system, using ORACLE_AFFINITY can be a way to
keep Oracle confined to a subset of the available CPUs in order to give the other
applications time to run.
Both ORACLE_PRIORITY and ORACLE_AFFINITY are described in more
detail in the Windows-specific documentation that accompanies Oracle Database
10g Release 2 on Windows.
ASKER CERTIFIED SOLUTION
Avatar of charding
charding

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial