Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

binding an oracle instance to a cpu

Posted on 2001-08-22
6
Medium Priority
?
1,080 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
ID: 6415347
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
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:

  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 300 total points
ID: 6415550

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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 3

Expert Comment

by:UsamaMunir
ID: 6416369
Great Answer Ramesh!
Cheers!
0
 
LVL 6

Expert Comment

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

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
ID: 7058179
Zero response, finalized.
Moondancer - EE Moderator
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

963 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