Monday, August 31, 2015

Purpose 
-------

To provide Information on time sharing scheduling policy on HP and how Oracle 
makes use of the SCHED_NOAGE scheduling policy.
 
SCOPE & APPLICATION
-------------------

This note is intended for DBAs/ UNIX Admin to improve performance in OLTP.


HP SCHED_NOAGE Scheduling Policy
--------------------------------
On HP, most processes use a time sharing scheduling policy. Time sharing can 
have detrimental effects on Oracle performance by descheduling an Oracle process
during critical operations, for example, holding a latch. HP has a 
modified scheduling policy, referred to as SCHED_NOAGE, that specifically  
addresses this issue. Unlike the normal time sharing policy, a process scheduled
using SCHED_NOAGE does not increase or decrease in priority, nor is it preempted.

This feature is suited to online transaction processing (OLTP) environments 
because OLTP environments can cause competition for critical resources.  
In laboratory tests, the use of the SCHED_NOAGE policy with Oracle9i increased 
performance by up to 10 percent in OLTP environments. The SCHED_NOAGE policy 
creates little or no gains in decision support (DSS) Environments because 
there is little resource competition in these environments. Because each 
application and server environment is different, you should test and verify 
whether your environment benefits from the SCHED_NOAGE policy.


Enabling SCHED_NOAGE for Oracle
-------------------------------


To allow Oracle to use the SCHED_NOAGE scheduling policy, the group that the 
Oracle software owner belongs to (dba), must have the RTSCHED and RTPRIO
privileges to change the scheduling policy and set the priority level for Oracle 
processes. 


To give the dba group these privileges: 

1.As the root user, enter the following command: 

# setprivgrp dba RTSCHED RTPRIO 


2.To retain these privileges after rebooting, create the /etc/privgroup file, if 
it does not exist on your system, and add the following line to it: 

dba RTSCHED RTPRIO

___________________________________________________________________
Note:
Please remember to set the MLOCK privilege as well when using
raw devices.
___________________________________________________________________

3. The Oracle DBA must add the parameter HPUX_SCHED_NOAGE to the INIT.ORA file 
to enable the scheduling policy. HPUX_SCHED_NOAGE takes an integer parameter, 
and for HPUX 11.0 the valid ranges are 154 to 255; for HPUX 11i, the valid 
ranges are 178 to 255. Higher priorities are represented by lower values.

hpux_sched_noage=154 (for HP/UX 11.0)
hpux_sched_noage=178 (for HP/UX 11i)

Overall performance improvements of 5 to 10% especially for OLTP applications
can be expected.

References:
Note:217990.1 Init.ora Parameter  "HPUX_SCHED_NOAGE"  Reference
The HP documentation, rtsched(1) and rtsched(2) man page for more information 
on priority policies and priority ranges.

No comments:

Post a Comment