The schedtune Command


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 (VMM) 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 for AIX Versions 4.2 and earlier

The product documentation library is also available:

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 888s, 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. Call 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 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 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. 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.

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

Here are all of the parameters available:

[ Doc Ref: 90605221814622     Publish Date: Spt. 29, 2000     4FAX Ref: 3239 ]