Three page-space allocation policies are available:
Prior to AIX 4.3.2, the operating system by default used a late page-space allocation policy which means that a paging space page is only allocated when it is actually touched. Being touched means the page was modified somehow (for example, with the bzero() subroutine or if page was requested by the calloc() subroutine or the page was initialized to some value). With the late policy, paging space slots are allocated if RAM pages are touched, but the pages are not assigned to a particular process until that process wants to page out. Therefore, there is no guarantee that a process will always have sufficient paging space available if it needed to page out because some other process can start later and consume all of the paging space.
If you want to ensure that a process will not be killed due to low paging conditions, this process can preallocate paging space by using the Early Page Space Allocation policy. This is done by setting an environment variable called PSALLOC to the value of early. This can be done from within the process or at the command line (PSALLOC=early command). When the process uses the malloc() subroutine to allocate memory, this memory will now have paging-space disk blocks reserved for this process, that is, they are reserved for this process so that there is a guarantee that if the process needed to page out, there will always be paging space slots available for it. If using early policy and if CPU savings is a concern, you may want to set another environment variable called NODISCLAIM=true so that each free() subroutine call does not also result in a disclaim() system call.
A new page-space allocation policy (a modification of Late Page Space Allocation) was introduced in AIX 4.3.2: Deferred Page Space Allocation. Prior to AIX 4.3.2, a page-space disk block was allocated when a page was touched. However, this paging space may never be used, especially on systems with large real memory where paging is rare. With Deferred Page Space Allocation, the disk block allocation of paging space is delayed until it is necessary to page out the page, which results in no wasted paging space allocation. This does, however, result in additional overcommitment of paging space. On a system where enough virtual memory is accessed that paging is necessary, the amount of paging space required may be as much as was required on previously.
After a page has been paged out to paging space, the disk block is reserved for that page if that page is paged back into RAM. Therefore, the paging space percentage-used value may not necessarily reflect the number of pages only in paging space because some of it may be back in RAM as well. If the page that was paged back in is working storage of a thread, and if the thread releases the memory associated with that page or if the thread exits, then the disk block for that page is released.
Running the vmtune command with the -d option enables turning on or off the Deferred Page Space Allocation in order to preserve the Late Page Space Allocation policy. A value of 1 indicates that DPSA should be on, and a value of 0 indicates that DPSA should be off. If you choose to turn DPSA off, make sure that the kernel level is at least AIX 4.3.2.6 or higher.
The vmstat command (avm column), ps command (SIZE, SZ), and other utilities report the amount of virtual memory actually accessed because with DPSA, the paging space may not get touched. The svmon command (up through AIX 4.3.2) shows the amount of paging space being used, so this value may be much smaller than the avm value of the vmstat command.
It is safer to use the lsps -s command rather than the lsps -a command to look at available paging space because the command lsps -a only shows paging space that is actually being used. But the command lsps -s will include paging space being used along with paging space that was reserved using the EPSA policy.