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

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle News

 Oracle Forum
 Class Catalog


 Our Staff
 Our Prices
 Help Wanted!

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 UNIX
 Oracle UNIX
 Linux
 Oracle Linux
 Monitoring
 Remote help

 Remote plans
 Remote
services
 Oracle C++
 Oracle Java
 Apache
 JDeveloper
 App Server

 Applications
 Oracle Forms
 Oracle Portal
 11i Upgrades
 SQL Server
 Oracle Concepts
 HTML-DB Tips
 Software Help

 Remote Help  
 Development  

 Implementation


 Financials Training
 Oracle 11i
 Oracle Apps 11i
 Oracle Workflow
 Oracle AR 11i Class
 Oracle AP 11i class
 Oracle GL 11i class
 Oracle HR 11i class
 Oracle FA 11i class
 11i Project Mgt
 11i procurement
 11i collections


 Oracle Posters
 Oracle Books

 Oracle Tuning Book
 Oracle RAC Book
 Oracle Security
 Easy Oracle Books
 Oracle Scripts
 SQL Server DBA
 SQL Design Patterns
 Ion
 Excel-DB   


 BC Oracle News


 Rednecks!
 Dress code
 Arabian Stallion

 Burleson Arabians
 Guide Horses
 Don Burleson Blog
 Golf & Travel


 Privacy Policy
 

 

 

 
 

Using nice and priocntl to Change Execution Priority

Oracle Tips by Burleson Consulting

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
 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
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 cruise
 
 
 
Oracle performance tuning software
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

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 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle © is the registered trademark of Oracle Corporation.