Solved

binding an oracle instance to a cpu

Posted on 2001-08-22
6
1,035 Views
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 8.1.7.3? Thx.
0
Comment
Question by:jeyjeyarajan
6 Comments
 
LVL 3

Expert Comment

by:Wadhwa
Comment Utility
Hi,

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.

Sam..
0
 
LVL 3

Expert Comment

by:ramkb
Comment Utility

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:

  ORACLE_AFFINITY=name1:cpumask1;name2:cpumask2;name3:cpumask3;...

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:

  ORACLE_AFFINITY=DBWR:1;LGWR:2;USER:12;DEF:ROBIN

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:

  ORACLE_AFFINITY=MASK:3

  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
0
 
LVL 3

Accepted Solution

by:
ramkb earned 75 total points
Comment Utility

Hi,

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 8.1.7.3 binaries.

Cheers,
Ramesh
0
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.

 
LVL 3

Expert Comment

by:UsamaMunir
Comment Utility
Great Answer Ramesh!
Cheers!
0
 
LVL 6

Expert Comment

by:Mindphaser
Comment Utility
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.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks,

** 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.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
Zero response, finalized.
Moondancer - EE Moderator
0

Featured Post

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.

Join & Write a Comment

Suggested Solutions

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now