 |
|
_high_priority_processes tips
Oracle Tips by Burleson Consulting
March 18, 2010
|
On most servers, Oracle tasks are dispatched
without waiting (as seen by the “r” column in vmstat), so it is OK for
all of the Oracle background processes to have the same dispatching
priority.
However, in rare cases, the Oracle DBA may adjust the
priority of the database writer (DBWR) and log writer (LGWR) processes to
allow them to go to the head of the CPU dispatch queue on a busy system.
In Oracle on Windows there is only a single process
named “oracle” and Oracle manages the dispatching of the background
processes intelligently, but on UNIX/Linux, the processes are independent of
Oracle and their dispatching priority can only be changed at the OS level.
In UNIX, you can use the ps –elf command to see
each task dispatching priority and the NI column shows the existing
dispatching priority for the task. Note that there are special nice
values—SY (system) and RT (real time) tasks, and these have the highest
dispatching priority.
>ps -elf|more
F S UID PID PPID C PRI NI … SZ … STIME TTY TIME CMD
19 T root 0 0 0 0 SY … 0 … Dec 21 ? 0:00 sched
8 S oot 1 0 0 41 20 … 98 … Dec 21 ? 0:00 /etc/init -
19 S root 2 0 0 0 SY … 0 … Dec 21 ? 0:00 pageout
8 S root 182 1 0 41 20 … 217 … Dec 21 ? 0:00 /usr/lib/saf/sac -t 3
8 S qmaill 173 161 0 41 20 … 207 … Dec 21 ? 0:00 splogger qmail
8 S root 45 1 0 48 20 … 159 … Dec 21 ? 0:00 /usr/lib/devfseventd
There are several ways to adjust the
dispatching priority of Oracle background processes:
We also now see the hidden parameter _high_priority_processes
which can be used to adjust the relative priority of Oracle background
tasks.
For example, some Oracle experts say that
log file sync waits can be reduced by increasing the dispatching
priority of the LGWR background process using the hidden parameter
_high_priority_processes.
SQL> alter system set "_high_priority_processes"='LMS*|LGWR|PMON' scope=spfile;
Again, beware that you should only mess with hidden
parameters with the consent of Oracle Technical Support, and so long as your
runqueue is less than the number of CPU’s (as seen via vmstat), you should
very rarely need to alter the dispatching priority of an Oracle background
process.