Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 








Using nice and priocntl to Change Execution Priority

Oracle Database Tips by Donald Burleson

While CPU shortages generally require the addition of more processors on the server, there are some short-term things that you can do to keep running until the new processors arrive. Within the server, all tasks are queued to the CPUs according to their dispatching priority, and the dispatching priority is commonly referred to as the nice value for the task. Those tasks with a low nice value are scheduled ahead of other tasks in the CPU queue, while those tasks with a high nice value are serviced later (see Figure 6-5).

Figure 6-32: Task list and dispatching priorities

In emergency situations where you cannot immediately get more CPUs, you can assign a very low dispatching priority to the Oracle background process, causing them to get CPU cycles ahead of other tasks on the server. This will ensure that Oracle gets all of the CPU that it requires, but it will slow down any external tasks that are accessing the Oracle database. To do this, the systems administrator can alter the CPU dispatching priority of tasks with the UNIX nice or priocntl commands. The UNIX nice command is used to change dispatching priorities, but these numeric ranges vary by operating system. In general, the lower the nice value, the higher the priority.

Displaying the nice Values

In UNIX, you can use the ps ?elf command to see each task and its dispatching priority. In the following example, the NI column shows the existing dispatching priority for the task. Note that there are special nice values'sY (system) and RT (real time)?and these have the highest dispatching priority.

L 6-11

>ps -elf|more
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
19 S    root     3     0  1   0 SY  ?   0   - Dec 21 ?    22:13 fsflush
 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
 8 S    root    47     1  0  49 20  - 284   - Dec 21 ?     0:00 /usr/lib/devfsadmd
 8 S    root   139     1  0  46 20  - 425   - Dec 21 ?     0:00 /usr/sbin/syslogd
 8 S    root   126     1  0  77 20  - 247   - Dec 21 ?     0:00 /usr/sbin/inetd -s
 8 S    root  1600     1  0   0 RT  - 268   - Dec 22 ?     0:00 /usr/lib/inet/xntpd

Changing nice Values

Again, we need to note that there are huge dialect differences when using the nice command. In Linux, you can use nice to change the dispatching priority, but in Solaris you must use the priocntl command. You must have root authority to change the dispatching priority, and you will need to consult with your systems administrator before changing CPU dispatching priorities.

Now that we have an understanding of the processors on an Oracle database server, let's turn our attention to monitoring the RAM memory consumption on our Oracle server.

Monitoring Server Memory Consumption

In the UNIX environment, RAM memory is automatically managed by the operating system. In systems with ?virtual? memory, a special disk called swap is used to hold chunks of RAM that cannot fit within the available RAM on the server. In this fashion, a virtual memory server can allow tasks to allocate memory above the RAM capacity on the server. As the server is used, the operating system will move some memory pages out to the swap disk in case the server exceeds its physical capacity. This is called a page-out operation. Page-out operations occur even when the database server has not exceeded the RAM capacity.

RAM memory shortages are evidenced by page-in operations. Page-in operations cause Oracle slowdowns because tasks must wait until their memory region is moved back into RAM from the swap disk (see Figure 6-6). The remedy for memory overload is to add more memory or to reduce the demands on memory by reducing sort_area_size, implementing the multithreaded server, or reducing the values for shared_pool or db_block_buffers.

Figure 6-33: Periodic RAM memory overload on a database server

Let's begin by looking at how memory is configured for a database server and explore how to manage memory on a large server.

Also see my notes on using the _high_priority_processes parameter to change dispatching priority of background tasks.

This is an excerpt from "Oracle9i High Performance tuning with STATSPACK" by Oracle Press.

If you like Oracle tuning, you may enjoy the new book "Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.



Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.