More About ORACLE_AFFINITY ORACLE_PRIORITY Windows Process Scheduling

Using ORACLE_AFFINITY

Under certain conditions, it might be desirable to reserve a CPU for a particular thread or set of threads. Good candidates are usually threads that either are single threads and whose performance degrades with higher load or who affect performance adversely on all CPU’s on the system.

 

When running RAC, the CPU utilization of LMS processes increases at a faster pace than the number of lock and CR and current blocks requests. The throughput and scalability of LMS are crucial to the performance of RAC, since current and CR server, as well as lock request latencies are directly correlated with how fast and efficient LMS can process the requests. Tests on Solaris in Oracle8i have shown, that binding LMD0 to a separate CPU, will give nearly optimal performance results. On NT, the LMS threads can also be bound to a dedicated processor.

 

Example:

 

HKEY_LOCAL_MACHINE->SOFTWARE->ORACLE->

 

  • ORACLE_AFFINITY=”LMS0:8;LMS1:8;DEF:7;USER:7”

On a 4-CPU machine, this would indicate that the LMS threads run on CPU 3, and all other Oracle threads on CPU’s 0, 1 and 2.

 

  • ORACLE_AFFINITY=”LMS0:1;DEF:14”

LMS0 runs on CPU 0, all other threads on CPU’s 1, 2 and 3.

 

Using ORACLE_PRIORITY

 

Similarly to ORACLE_AFFINITY, the priority of an Oracle thread can be modified. There exist six different thread priorities:

 

  • lowest
  • below_normal
  • normal
  • above_normal
  • highest
  • time_critical

 

Since threads can have their priorities dynamically adjusted by the system within a process in the idle, normal or high priority class, using ORACLE_PRIORITY may not have a big impact. Also, when CPU resources are already limited, having a single thread running with increased priority will not increase throughput any further. This was observed when running the LMD thread with priority set to HIGHEST in an Oracle8 8i environment.

 

More information can be found in the “Oracle Database 10g Architecture on Windows” white paper on OTN, in the Windows specific 10g documentation.

Comment

*

沪ICP备14014813号

沪公网安备 31010802001379号