Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

binding an oracle instance to a cpu

Posted on 2001-08-22
Last Modified: 2007-11-27
Is there a way to bind an oracle instance to a cpu in a multi processor w2k intel environment. The Oracle version is Thx.
Question by:jeyjeyarajan

Expert Comment

ID: 6415347

You can use a DBMS_RESOURCE_MANAGER package provided by oracle 8i. You can get instruction for how to use this from oracle document or technet.


Expert Comment

ID: 6415505

Hi there,

I think you are looking for information on processor affinity.  You can set this in Oracle for NT (2000) by setting a registry variable ORACLE_AFFINITY.

Here is an article which gives you detailed information on how to set this.

ORACLE_AFFINITY - How to Restrict Oracle on a Multi-CPU NT Machine:

In V8, you can set the ORACLE_AFFINITY registry value to tell Oracle which threads to run on which processors.  The format for ORACLE_AFFINITY is:


where 'name' is one of:

  o MASK -- Sets the processor mask for the entire process/instance.  
     This is the set of processors that any of the threads are allowed to run.  The default, if not set, is all CPUs in the system.

  o DBWR, LGWR, SMON, PMON, etc... -- Sets processor mask for the particular named thread.  Any named thread that shows up in v$bgprocess can be set in this way.

  o USER -- Sets the processor mask for ALL shadow threads.

  o DEF -- Sets the processor mask for any threads not listed explicitly.  
     The default is for all CPUs on the system.

and 'cpumask' can have the following values:

  1 = binary 0001 - pinned to CPU #1
  2 = binary 0010 - pinned to CPU #2
  3 = binary 0011 - can use CPU 1 or CPU 2
  4 = binary 0100 - pinned to CPU #3
  15 = binary 1111 - can use CPU 1, 2, 3, or 4
  2^n - 1 ... where n == number of CPUs in the system

and 'DEF' and 'USER' can have the following values:

  o ROBIN -- For USER or DEF name, this uses a round-robin mechanism where the next thread gets pinned to the next CPU in the round-robin sequence.  
    If there are four CPUs in the system, the first USER or DEF case goes to CPU #1, the next to CPU #2, etc..., and then back around to CPU #1 for thread #5.

  o FLOAT -- For USER or DEF name, this is the same as round-robin except there is a floating group of threads that can run on any CPU specified in MASK.

    If you had four CPUs, then one-fifth of the USER and DEF threads would run on CPU #1, one-fifth on CPU #2, one-fifth on CPU #3, one-fifth on CPU #4, and then one-fifth on any of the CPUs.  (These are the FLOATing threads.)

Note:  Any of the values used for cpumask for the threads are bounded by the value used for MASK.  If MASK is set to use only CPU #1, then all other settings are ignored, and all threads are bound to CPU #1.  

       Therefore, MASK is the allowable CPUs that any of the threads can run on.

A typical ORACLE_AFFINITY setting might look like:


This would mean that DBWR is always on CPU #1, LGWR is always on CPU #2, all shadow threads could run on either CPU #3 and CPU #4 (since 12 = binary 1100), and then all other backgrounds would be split evenly among all the CPUs in the system.

If you want to run Oracle on two processors, you could set:


  since 3 == 0x0011 for processors one and two.

The only caveat is that there is only one registry parameter and all instances use the same value.

Hope this helps...
- Ramesh

Accepted Solution

ramkb earned 75 total points
ID: 6415550


BTW, you need to set this variable in your registry under HKEY_LOCAL_MACHINE\Software\Oracle\Homex where x is the corresponding Oracle_Home for your binaries.

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.


Expert Comment

ID: 6416369
Great Answer Ramesh!

Expert Comment

ID: 7042768
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.



** Mindphaser - Community Support Moderator **

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.

Expert Comment

ID: 7058179
Zero response, finalized.
Moondancer - EE Moderator

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Retreiving column names in Windows but not in Unix 11 58
Oracle Verification of DataPump Export and Import 17 60
Oracle DB monitor SW 21 60
add more rows to hierarchy 3 25
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question