Sets parameters for CPU scheduler and Virtual Memory Manager processing.
schedtune [ -D | { [ -d n ] [ -e n ] [ -f n ] [ -h n ] [ -m n ] [ -p n ] [ -r n ] [ -t n ] [ -w n ] } ]
The priority of most user processes varies with the amount of CPU time the process has used recently. The CPU scheduler's priority calculations are based on two flags that are set with schedtune, -r and -d. The -r and -d values are in thirty-seconds (1/32); that is, the formula used by the scheduler to calculate the amount to be added to a process's priority value as a penalty for recent CPU use is:
CPU penalty = (recently used CPU value of the process) * (r/32)
and the once-per-second recalculation of the recently used CPU value of each process is:
new recently used CPU value = (old recently used CPU value of the process) * (d/32)
Both -r and -d have default values of 16. This maintains the CPU scheduling behavior of previous versions of the operating system. Before experimenting with these values, you should be familiar with Tuning the with the schedtune command.
The operating system scheduler performs memory load control by suspending
processes when memory is over committed. The system does not swap out
processes; instead pages are "stolen" as they are needed to fulfill the
current memory requirements. Typically, pages are stolen from suspended
processes. Memory is considered over committed when the following
condition is met:
p * h s | where p is the number of pages written to paging space in the last second, h is an integer specified by the -h flag, and s is the number of page steals that have occurred in the last second. |
A process is suspended when memory is over committed and the following
condition is met:
r * p f | where r is the number of repages that the process has accumulated in the last second, p is an integer specified by the -p flag, and f is the number of page faults that the process has experienced in the last second. |
In addition, fixed-priority processes and kernel processes are exempt from being suspended.
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.
The user also can specify a minimum multiprogramming level with the -m flag. Doing so ensures that a minimum number of processes remain active throughout the process-suspension period. Active processes are those that are runnable and waiting for page I/O. Processes that are waiting for events and processes that are suspended are not considered active, nor is the wait process considered active.
Suspended processes can be added back into the mix when the system has stayed below the over committed threshold for n seconds, where n is specified by the -w flag. Processes are added back into the system based, first, on their priority and, second, on the length of their suspension period.
Before experimenting with these values, you should be thoroughly familiar with Tuning VMM Memory Load Control with the schedtune Command.
The schedtune command can also be used to change the amount of time the operating system allows a given process to run before the dispatcher is called to choose another process to run (the time slice). The default value for this interval is a single clock tick (10 milliseconds). The -t flag of the schedtune command allows the user to specify the number of clock ticks by which the time slice length is to be increased.
In AIX Version 4, this parameter only applies to threads with the SCHED_RR scheduling policy. See Scheduling Policy for Threads.
If a fork() subroutine call fails because there is not enough paging space available to create a new process, the system retries the call after waiting for a specified period of time. That interval is set with the schedtune -f flag.
schedtune can only be executed by root. Changes made by the schedtune command last until the next reboot of the system. If a permanent change in VMM or time-slice parameters is needed, an appropriate schedtune command should be put in /etc/inittab.
Attention: Misuse of this command can cause performance degradation or operating-system failure. Be sure that you have studied the appropriate tuning sections before using schedtune to change system parameters.
If no flags are specified, the current values are printed.
The fork subroutine.
Tuning the with the schedtune command.
Tuning VMM Memory Load Control with the schedtune Command.