binding an oracle instance to a cpu

Is there a way to bind an oracle instance to a cpu in a multi processor w2k intel environment. The Oracle version is Thx.
Who is Participating?
ramkbConnect With a Mentor Commented:


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.


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.


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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Great Answer Ramesh!
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.
Zero response, finalized.
Moondancer - EE Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.