Page space allocation policy

AIX, by default, implements a late page space allocation policy, but you can change this default setting.

When a program asks for a large memory allocation, AIX grants the virtual memory allocation but does not allocate the space on the backing store (or swap) until it is actually used. In contrast, early page space allocation first allocates the space in swap before granting the virtual memory.

With late page space allocation, AIX could successfully start many processes. However, as these processes use their virtual memory, AIX could run low on swap. When this happens, AIX chooses the youngest process to kill. The following message on the application server's console indicates that it was killed:


   ./startManagedWebLogic.sh[216]: 13550 Killed
   

The following error message is shown in the AIX error log if your application server instance was killed because of late page space allocation:


   Date/Time:       Thu May 30 17:35:37
   Sequence Number: 39
   Machine Id:      000F257F4C00
   Node Id:         ibm04
   Class:           S
   Type:            PERM
   Resource Name:   SYSVMM
   
   Description
   SOFTWARE PROGRAM ABNORMALLY TERMINATED
   
   Probable Causes
   SYSTEM RUNNING OUT OF PAGING SPACE
   
   Failure Causes
   INSUFFICIENT PAGING SPACE DEFINED FOR THE SYSTEM
   PROGRAM USING EXCESSIVE AMOUNT OF PAGING SPACE
   
           Recommended Actions
           DEFINE ADDITIONAL PAGING SPACE
           REDUCE PAGING SPACE REQUIREMENTS OF PROGRAM(S)
   
   Detail Data
   PROGRAM
   java
   USER'S PROCESS ID:
          19194
   PROGRAM'S PAGING SPACE USE IN 1KB BLOCKS
         295388
   

You can reduce the likelihood of a late page space allocation kill by increasing the amount of swap space. However, the recommended approach is to selectively turn on early page space allocation by exporting the following environment variables:


   export PSALLOC=early
   export NODISCLAIM=true
   

The NODISCLAIM environment variable will eliminate a call to the disclaim() system routine when a free() call is issued. You will experience high CPU utilization (due to system calls) if you use early page allocation but do not set this variable.

You can increase swap and page space requirements significantly if you set these two variables for all workloads. As a result, we recommend you only set these two variables for your JVMs and not across the system for all other workloads.

For Sterling Order Management System Software agents and WebLogic application servers, you can issue the commands in the startup scripts. For WebSphere®, you can define the environment variables in the Environment dialog box in the administrative client.

If you make that change and not increase the swap space, the following error message is shown immediately on startup:


   Unable to alloc heap of requested size, perhaps the maxdata value is too 
small - see README.HTML for more information.
   Unable to allocate an initial java heap of 1073741824 bytes.
   **Out of memory, aborting**
   
   *** panic: JVMST016: Cannot allocate memory for initial java heap
   

The exception above is actually the desired behavior because AIX is stating that it is unable to guarantee that there is enough swap space for all potential requirements.