The schedtune Command


Contents

About This Document
    Related Documentation
About schedtune
Priority Calculation
Memory-Load Control

About This Document

This Document discusses the schedtune command used to modify CPU scheduler and Virtual Memory Manager processing parameters. This document applies to AIX Version 4.x.

Related Documentation

AIX Versions 3.2 and 4 Performance Tuning Guide (SC23-2365)
1995/AIXtra POWER Technical Conference, Vol. II
InfoExplorer

The AIX and RS/6000 product documentation library is also available:

http://www.rs6000.ibm.com/resource/


About schedtune

The command and source for schedtune is found in the /usr/samples/kernel directory. It is installed with the bos.adt.samples fileset.

WARNING: Schedtune is in the samples directory because it is VMM-implementation dependent. The schedtune code that accompanies each release of AIX was tailored specifically to the VMM in that release. Schedtune is not supported under SMIT, nor has it been tested with all possible combinations of parameters. Misuse of this command can cause performance degradation or operating-system failure. If execution of schedtune causes a system to crash with flashing 888's, then the appropriate level of schedtune for that release of AIX needs to be installed.

It takes experience and know-how to set schedtune parameters properly. Therefore, it is highly recommended that schedtune values be set only after consulting the AIX Performance team. To reach them, call 1-800-CALL-AIX or your support center and ask for a performance analysis through consult line.


Priority Calculation

The priority of most user processes varies with the amount of CPU time the process has used recently. The formula for calculating a process's or thread's priority value is:

priority value = base value + nice value + (CPU penalty based on recent CPU usage)

The scheduler's CPU penalty calculations are based on two parameters that can be set with schedtune: -r and -d.

The formula used by the scheduler to calculate the amount to be added to a process's or thread's priority value as a penalty for recent CPU use is:

CPU penalty = (recent CPU use value) * (-r value / 32)

NOTE: The default value for "r" is 16.

The once-per-second recalculation of the recently used CPU value of each process or thread is:

(old recent CPU use value) * (-d value / 32)

NOTE: The default value for "d" is 16.

The recent CPU usage value is displayed as the "C" column in the ps command output. The maximum value of recent CPU usage is 120. You can view the current nice value (NI), priority (PRI) and CPU usage value (C) for user processes by running

 
         ps -el | more 

Memory-Load Control

The AIX scheduler performs memory-load control by suspending processes when memory is overcommitted. The system does not swap out processes; instead pages are "stolen" as they are needed to fulfill the current memory requirements. Pages are stolen based on a least recently used algorithm; hence pages from suspended processes will most likely be stolen first.

Memory-load control is intended to smooth out infrequent peaks in load that might otherwise cause a system to thrash. It is NOT intended to act continuously in a configuration that has too little RAM to handle its NORMAL workload.

Memory is considered overcommitted when the number of pages written to paging space in the last second, multiplied by the value of the -h parameter, is greater than the number of page steals in the last second. A process is suspended when memory is overcommitted and the number of repages that the process has accumulated in the last second, multiplied by the value of the -p parameter, is greater than the number of page faults that the process has accumulated in the last second. The term "repages" refers to the number of pages belonging to the process, which were reclaimed and are soon after referenced again by the process.

No notion of "interactive" versus "non-interactive" processes exists, so suspended processes may well be those that interact directly with end-users.

You should not change the memory-load control parameter settings unless your workload is consistent and you believe the default parameters are not appropriate for your workload.

Here are all of the parameters available:


The schedtune Command: schedtune.4x.spf ITEM: FAX
Dated: 98/09/03~00:00 Category: spf
This HTML file was generated 99/06/24~12:42:09
Comments or suggestions?
Contact us