[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Performance Management Guide

Tuning Paging-Space Thresholds

If available paging space depletes to a low level, the operating system attempts to release resources by first warning processes to release paging space and finally by killing processes if there still is not enough paging space available for the current processes.

Choosing npswarn and npskill Settings

The npswarn and npskill thresholds are used by the VMM to determine when to first warn processes and eventually when to kill processes.

These two parameters can be set through the vmtune command:

npswarn (-w)
Specifies the number of free paging-space pages at which the operating system begins sending the SIGDANGER signal to processes. If the npswarn threshold is reached and a process is handling this signal, the process can choose to ignore it or do some other action such as exit or release memory using the disclaim() subroutine. The default value in AIX Version 4 is determined by the following formula:
npswarn = maximum (512, 4*npskill)

The value of npswarn must be greater than zero and less than the total number of paging-space pages on the system. It can be changed with the command vmtune -w.

npskill (-k)
Specifies the number of free paging-space pages at which the operating system begins killing processes. If the npskill threshold is reached, a SIGKILL signal is sent to the youngest process. Processes that are handling SIGDANGER or processes that are using the early page-space allocation (paging space is allocated as soon as memory is requested) are exempt from being killed. The formula to determine the default value of npskill is as follows:
npskill = maximum (64, number_of_paging_space_pages/128)

The npskill value must be greater than zero and less than the total number of paging space pages on the system. It can be changed with the command vmtune -k.

nokillroot and nokilluid (-n)
By setting the nokillroot option to 1 with the command vmtune -n 1, processes owned by root will be exempt from being killed when the npskill threshold is reached. This option is only available in AIX 4.3.3 and 4.3.3.1.

By setting the nokilluid option to a nonzero value with the command vmtune -n, user IDs lower than this value will be exempt from being killed because of low page-space conditions. This option is only available in operating system version 4.3.3.2 and later.

Tuning the fork() Retry Interval Parameter with schedtune

If a process cannot be forked due to a lack of paging-space pages, the scheduler will retry the fork five times. In between each retry, the scheduler will delay for a default of 10 clock ticks.

The -f parameter of the schedtune command specifies the number of clock ticks to wait before retrying a failed fork() call. For example, if a fork() subroutine call fails because there is not enough space available to create a new process, the system retries the call after waiting the specified number of clock ticks. The default value is 10, and because there is one clock tick every 10 ms, the system would retry the fork() call every 100 ms.

If the paging space is low only due to brief, sporadic workload peaks, increasing the retry interval (such as in the following) might allow processes to delay long enough to be released:

# /usr/samples/kernel/schedtune -f 15

In this way, when the system retries the fork() call, there is a higher chance of success because some processes might have finished their execution and, consequently, released pages from paging space.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]